Creating a UserWidget with child widgets in c++. child widgets don't show up in the hierarchy view

I’m trying to create a UserWidget that contains sub widgets in c++ that can become a base class for a blueprint widget.
For example a UserWidget that already contains a UButton.
I’ve tried constructing the UButton in the Initialize event, and when creating a blueprint subclass, the button does show in the desig viewport, but no in the hierarchy view.

UButton *button = WidgetTree->ConstructWidget<UButton>(UButton::StaticClass(), TEXT("Button01"));
WidgetTree->RootWidget = button;

Is there another way to do this?