How to code widget/menu with c++ not blueprints

Hi
I made simple menu, with blueprints, but now i want to try write everything with c++.

I created new c++ class that inherit from UUserWidget, next for my menu widget, set parent class to my c++ class.
And now i cant find any good example what to do next.

i add in public section
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “My New User Widget”)
UButton* myBtn;

so i can see in blueprint widget this variable

https://forums.unrealengine.com/filedata/fetch?filedataid=152661&type=thumb

but after chose anything, field is still empty, so i dont know if i set this vriable or not.
next i want to add onClicked to this button, but like i said i cant find any good example for this.

Could someone show me how to do this
pls help