Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
MainWindow or QDockWidget not resizing after undocking another QDockWidget .
Diracsbracket last edited by Diracsbracket
I have a QMainWindow app which contains a QDockWidget at the top, and one at the bottom.
When the dock at the top is undocked, a few widgets in the centralWidget are made visible. These widgets are made invisible again when the top-dock is docked again.
The problem is that when undocking the top dock, the centralWidget correctly expands to show the newly visible widgets and moves up to correctly align with the top of the MainWindow.
The bottom dock however, is not resized correctly: it aligns with the bottom of the centralWidget, but its height is not increased to fill up all the space at the bottom, leaving a large space between it and the status bar of the MainWindow. The docks have a minimum size, but no maximum size, and both are expanding correctly as the MainWindow is expanded.
Note that the bottom dock will immediately resize to the full size as soon as I grab its resize corner, or the resize corner of the MainWindow.
I tried using
adjustSize()on the bottom dock when the upper dock is undocked, but this has no effect.
How can I achieve this?
Can you share the code you are currently using for that ?