Following this tutorial Epic UE 5.1 C++ Slate Tutorial The last part has you add your SCompoundWidget class to the module created when you add a stand alone editor window plugin.
SNew(SQuickStartWindowMenu)
however, when i do this, nothing renders in the view. When you take all the Slate declarations and put them directly in the same function (replacing the snippet above), it all renders. There are no build error or warnings. I’ve tried the hot reload and rebuilding the C++ of the project in visual studio.
To be clear this:
SNew(SVerticalBox)
+SVerticalBox::Slot()
.AutoHeight()
[
SNew(SHorizontalBox)
+SHorizontalBox::Slot()
.VAlign(VAlign_Top)
[
SNew(STextBlock)
.Text(FText::FromString("Test Button"))
]
+SHorizontalBox::Slot()
.VAlign(VAlign_Top)
[
SNew(SButton)
.Text(FText::FromString("Press Me"))
]
]
+SVerticalBox::Slot()
.AutoHeight()
[
SNew(SHorizontalBox)
+SHorizontalBox::Slot()
.VAlign(VAlign_Top)
[
SNew(STextBlock)
.Text(FText::FromString("Test Checkbox"))
]
+ SHorizontalBox::Slot()
.VAlign(VAlign_Top)
[
SNew(SCheckBox)
]
]
when put inside the TabRole()
declaration of the module class created when creating a standalone editor plugin works. As soon as you put it in a custom widget and call that widget in the same TabRole()
declaration (replacing your code as it was moved into the widget) nothing renders.
I’ve tried creating the widget a few different ways…
SNew(SDockTab)
.TabRole(ETabRole::NomadTab)
[
SNew(SMyWidget)
]
SNew(SDockTab)
.TabRole(ETabRole::NomadTab)
[
SNew(SVerticalBox)
+SVerticalBox::Slot()
[
SNew(SMyWidget)
]
]
It doesn’t matter what the contents of SMyWidget::Construct(constFArguments& InArgs)
are, they don’t show up in the editor window.
What am i doing wrong