DockWidget in Central Widget
-
Hello,
is it possible to make the central widget to a docking area for dockwidgets?
At the moment my central widget of the main window is completely filled with a Open GL Widget for 3D Graphics and around this i have multible DockWidgets with tools, settings, etc.
Now I want the OpenGL Widget placed in a DockWidget instead of the central widget so can can drag it around, undock it from the main window, place it in the DockAreas around or place a other DockWidget from outside in the center.Visual Studio has a similar GUI, there is the texteditor in the center and I can undock the editor from the center and place it anywhere else and drag the setting dockwidgets from the side in the center.
Is this possible with Qt?
Moritz
-
no the central widget is not draggable in a QMainWindow.
The only thing you can do is nesting QMainWindows. But this won't probably do what you want it to do, since there will always be a fixed central widget. -
It is possible with Qt, but standard Qt components don't offer this functionality. You'll either have to find a component that does (perhaps a 3rd party component?), patch Qt to suit your needs, or write a component yourself that does this.
-
Hi
I had a similar requirement and solved it by setting the central widget to 0 and then added the dock widgetshth