Right now, I have a WidgetAdder class which takes in some input from some text fields. It also has an Add button that when clicked, will add a ChildWidget to a SVerticalBox.
My problem is that I want the ChildWidget to have a Remove button, that when clicked, will remove itself from the SVerticalBox. I’m having trouble figuring out how to do so effectively.
What I have right now is the main widget passes itself down as a slate attribute to the ChildWidget, then when the ChildWidget is ready, it calls a function in the main widget which calls SVerticalBox.RemoveSlot(ChildWidget). Unfortunately, this is giving me a lot of different errors having to do with memory allocation, arrays, and even “hovering over tooltips” for some reason… I’m not quite sure. ← I found the issue with this, poor use of TSharedPtrs/Refs.
If someone has a good setup for this scenario I’d love to hear it. Thanks!