Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.3.1, 5.4.0
-
None
-
Windows 7, Qt 5.4.0, Qt 5.3.1, MinGW 4.9.1, MinGW 4.8.2
Description
The bug appears when you create and dock two QDockWidets on the same side of QMainWindow. The upper one has to have its minimum and maximum size set to the same value and has a custom widget set via setWidget(QWidget *) method. This could be a default-constructed QWidget. The lower QDockWidget can be just a simple default-constructed instance.
When you do this, the drag-resize icons, neither vertical nor horizontal, do not appear. If you change the order and place the normal QDockWidget on top, vertical drag-resizing becomes possible, but horizontal doesn't.
Still, you should be able to resize the widgets no matter what the order is.
When the custom widget is not set or width limits are not set to the same value, the bug doesn't appear.
Here is the minimal code for QMainWindow.
QDockWidget *limitedWidthDockWidget = new QDockWidget(this); limitedWidthDockWidget->setMinimumWidth(200); limitedWidthDockWidget->setMaximumWidth(200); QWidget *widget = new QWidget(limitedWidthDockWidget); limitedWidthDockWidget->setWidget(widget); QDockWidget *normalDockWidget = new QDockWidget(this); addDockWidget(Qt::RightDockWidgetArea, limitedWidthDockWidget); addDockWidget(Qt::RightDockWidgetArea, normalDockWidget);
Reproduction steps for vertical resize case in the attached project are as follows.
- Run the qtbug41068_dockresizebug.zip project.
- Move the mouse cursor between the QDockWidgets.
- Try to drag-resize them.
Expected: you can freely resize the widgets vertically.
Actual: drag-resize icon doesn't appear and you are unable to resize.
Horizontal resize bug also appears in the project.
- Run the qtbug41068_dockresizebug.zip project.
- Move the mouse cursor over the left side of either widget
- Try to drag-resize them.
Expected: you can resize the widgets horizontally as long as width is equal or greater than upper widget's minimal width. The lower widget resizes freely and the upper one stays at the same size, creating empty space on the right side when width is extended.
Actual: drag-resize icon doesn't appear and you are unable to resize.