I created a widget name ButtonBase which include a text and a button widget, then I created ButtonCustom inherited form ButtonBase,all children widgets of ButtonBase can not be seen under ButtonCustom hierarchy. How to solve it ?
There were once great plans for the widgets to inherit the container hierarchy - afaik those never truly materialised. You can reparent widgets and their variables will be accessible on children but if you were hoping to inherit hierarchy itself, no dice, sadly.