How to show the SWindow when I clicked the button?

I am learning to create a plugin for UE4,I need to show the windows I have created,like this:

TSharedRef<SWindow> Window = SNew(SWindow)
.Title(LOCTEXT)
.SizingRule(ESizingRule::Autosized)
.Content()
[
SNew(SVerticalBox)
+ SVerticalBox::Slot().AutoHeight().Padding(20).HAlign(HAlign_Center)
[
SNew(STextBlock).Text(LOCTEXT)
]
];
 Window->ShowWindow();
 FSlateApplication::Get().AddWindow(Window);

but it doesnt work,I dont know what i missed? Any idea?

Hello iceprincefounder,

It seems like you had already posted this same question over here at this location: How to show the SWindow when I clicked the button? - C++ - Epic Developer Community Forums

I’ll be closing this one from further comments, so please refer to the other post for this issue.