Frage

Using the QMainWindow I have added 3 DockWidgets and set centralWidget to 0, so now the DockAreas can take up all the space.

Have a look:

enter image description here

This looks the way I want and behaves even more so. But There is one effect that breaks it all.

When I rip Dockout of its DockArea, the other DockArea expands and takes up all the space and the Area where Dock once resided is gone. I now have something like this:

enter image description here

From now on it is not possible to dock any widgets right or left, since only one DockArea exists. But can this be fixed? Can I somehow keep a DockArea "alive", even after its only widget was floated?

War es hilfreich?

Lösung

You need to set the dockNestingEnabled property of the QMainWindow to true in order to allow the docks to be docked vertically or horizontally. Otherwise, you can only do one or the other.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top