I am aware of dock widgets, splitters, etc. Still I wonder, if it's possible to create flexible splitting system like in Eclipse: when any widget just keeps splitting either vertically or horizontally depending on the position of the cursor during dragging.
For instance, the very first widget A
occupies the whole QMainWindow
. The second one B
opens in a tab first, so it's either
-----
| A |
-----
or
-----
| B |
-----
Then I drag the tab of B
to (lets say) right area of QMainWindow
- and get a vertical split like:
---------
| A | B |
---------
Then I open some other widget C
. It again opens in a tab (lets say in left-and-top-most by default), so it's either
---------
| A | B |
---------
or
---------
| C | B |
---------
Now, I drag the tab of C
to the bottom of B
and get:
---------
| | B |
A -----
| | C |
---------
Or if I would drag it to the bottom-middle of QMainWindow
I would get:
---------
| A | B |
---------
| C |
---------
I hope you got the idea. If you are familiar with Eclipse it should be even easier to understand. The key point here is that I can do this infinitely many times and build absolutely customized layout, for example:
-----------------
| | B | G | |
| A --------- |
| | D | | F |
--------- E | |
| C | | |
-----------------
| H |
-----------------
This example looks messy, and the benefit of such crazy layout is of course questionable, but anyway, the question is - does Qt provide this behavior either out-of-the-box or at least some facilities to achieve it with minimal coding effort.