How to create a custom container (like QMainWindow) designable in Designer?
-
I want to create a custom widget with some predefined children, and a
centralWidgetfor derived classes to put other widgets in.
I tried, but you can drag and drop child widget everywhere in the designer! How to make children dragable only in thecentralWidget's aera? What's more, how if I want a moredockWidgetarea?So, what's the solution? Help!
-
I want to create a custom widget with some predefined children, and a
centralWidgetfor derived classes to put other widgets in.
I tried, but you can drag and drop child widget everywhere in the designer! How to make children dragable only in thecentralWidget's aera? What's more, how if I want a moredockWidgetarea?So, what's the solution? Help!
centralWidgetis only the pre-defined objectname for the default content (widget) of aQMainWindow, which is aQWidgetitself.
What's wrong with using the basicQMainWindow?!
Especially using QtDesigner only, it will be hard to implement your idea.I tried, but you can drag and drop child widget everywhere in the designer! How to make children dragable only in the centralWidget's aera?
That sounds like QtDesigner specific design-mode behavior and not how the widget behaves at runtime.
I'm thinking of a modified QtDesigner with a designer plugin for your widget... but why?!