Expose on Spawn in C++ for Widgets

is there something like Spawn Actor Deferred for Widgets? I Mean Storing the Widget in a variable, so I can fill Variables of the widget, but do not run the constructor already.

There is this option in Blueprints where I can make a Variable exposed on Spawn. Is there something similar in C++ for Widgets?

I hope I made this clear. If not please ask an I can clarify.

Thanks in Advance

Construct doesn’t run until you add your widget to viewport or to a parent widget. So CreateWidget(), do whatever you need to it, then AddToViewport();


Ah I did not know that. Thank you for clarification. That makes my code much cleaner.