Can the TopDockWidgetArea dock widgets in a vertical layout

258 views Asked by At

The top dock widget area works like a Splitter in Horizontal orientation (with additionally stacking tab feature not relevant to this question) as such:

 _____________________
|   |       |         |
|  A|  B    |  C      |
|___|_______|_________|
|   |             |   |
|   |             |   |
|   |             |   |
|___|_____________|___|
|                     |
|_____________________|

Is it possible to make this dock area work like a Vertical QSplitter instead as:

 _____________________
|         A           |
|_____________________|
|         B           |
|_____________________|
|         C           |  
|_____________________|
|   |             |   |
|   |             |   |
|___|_____________|___|
|                     |
|_____________________|
1

There are 1 answers

0
Lucas On

I was very surprised that this is very easy to achieve.

Look into the DockWidget Example from Qt! There are some options for the DockArea. In the Mainwindow the options have to be applied:

setDockNestingEnabled(true)

Here is the documentation