DockWidget and Dock area NO central Widget..
-
https://imgur.com/a/TLDCI
How can I achieve this? i want to use dock widget and area. so that my widget is movable and by area doesn't resize. -
@vicky12 I would just force the size of your dock widgets to always cover the area where the central widget would be. So after a resize() event just resize your dock widgets to fill the area.
This is a weird and non-standard way to do a gui though, not quite sure why you would want this.
You could also not use a QMainWindow and just make a QWidget with the 3 movable widgets inside it be the "main window". Then there is no central widget. If you wanted the other features of mainwindow, you can also make custom movable widgets that can be dragged and dropped to relocate inside a single QWidget that would be your central widget.
-
I looked at a similar thing for a while actually, Implementing it mixing
QMdiArea
andQDockArea
is a mess. There are commercial products for it but couldn't find a viable solution