Customizing docking/Programming own docking mechanism
I'd like to realize a dockable application without a central widget, like such:
Widgets X have fixed size and there can be arbitrarily many. Widget L is one widget, which has fixed width but not height, it spans from top to bottom and can be docked on the left or right. Widget Y has fixed width but not height. The widgets should all be dockable/rearrangeable and the application should only be resizable in Y Direction (resizing L and Y).
How do I do it?
I know it's not that simple ;) QMainWindow requires a central widget and the docking policys are limited. I belive I will have to implement my own derivatives of QMainWindow and QDockWidget.
Where is a good place to start?
Hi Eddy, I am not sure if I will be correct as I wanted to do similar docking solution to yours but I had no time yet. The idea of where to start would be looking at this documentation page:
It is all about drag and drop mechanism. I think it would be good to create two types of widgets. One, let's say, it's called DockArea and another one is DockWidget. You could place this DockWidget in one of the DockAreas and reimplement drag and drop for both Widgets so while moving you could actually place those widgets in different widgets. I think it would be the easiest way to start but it's only my idea. Thanks!