Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.9, 5.15.1
-
None
-
-
e6d85cf28 (dev), a884cf6e8 (tqtc/lts-6.5), 9557d1ca9 (6.6)
Description
When creating a floating QDockWidget with a parent and closing it with the mouse, qt raise a warning:
QMainWindowLayout::tabPosition called with out-of-bounds value '0'
There is no warning if:
- The QDockWidget has no parent
- The QDockWidget is closed programmatically
- The QDockWidget is docked and undocked before closing
Tested with various version (5.9, 5.11.9 ,5.12, 5.15.1) all show the issue
The issue was not here in Qt 5.7.1
Simple code to reproduce the issue:
int main(int argc, char* argv[]) { QApplication lApp(argc, argv); QMainWindow a; a.setCentralWidget(new QLabel("Main")); a.show(); auto lWindow = new QDockWidget(&a); lWindow->setFloating(true); lWindow->show(); return lApp.exec(); }
You can check the discussion is this forum post for more detail about call stack:
https://forum.qt.io/topic/120411/warning-when-closing-an-undocked-qwidget/12
Attachments
For Gerrit Dashboard: QTBUG-88157 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
516878,51 | QDockWidget: Fix group unplugging | dev | qt/qtbase | Status: MERGED | -1 | 0 |
519600,5 | QDockWidget: Fix group unplugging | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
520573,5 | QDockWidget: Fix group unplugging | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |