Wouldn't it be more natural if WindowsTextEditor inherited one of available widget classes instead of a layout? It can always install a layout on itself but inheriting from a layout is weird since it clearly is a widget. Which of layout features are you extending with that subclass?