Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.1.0 Alpha
-
None
-
Ubuntu 20.04, Mutter
Description
It's possible that this is a side effect of how Wayland works, but it seems odd: You can position windows, but when positioning floating dock widgets they always end up to the top left of the main window.
Reproducible with the following example:
#include <QtWidgets> #include <QtGui> int main(int argc, char *argv[]) { QApplication a(argc, argv); QMainWindow window; window.resize(QSize(300, 300)); window.move(QPoint(100, 100)); QDockWidget *dock = new QDockWidget(&window); dock->setAllowedAreas(Qt::AllDockWidgetAreas); window.addDockWidget(Qt::TopDockWidgetArea, dock); dock->resize(QSize(50, 50)); dock->move(QPoint(200, 200)); dock->setFloating(true); window.show(); return a.exec(); }
On X11 this works fine, but on Wayland the dock widget is mispositioned. Found when investigating QDockWidget autotest.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-91483 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
337152,2 | Skip tst_QDockWidget::restoreDockWidget on Wayland | dev | qt/qtbase | Status: MERGED | +2 | 0 |