get error with" ‘UUserWidget’: no appropriate default constructor available"
you should specifically call the constructor that the class you inherited :
UMainMenu::UMainMenu(const FObjectInitializer& ObjectInitializer) : UUserWidget(ObjectInitializer)