Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.9, 5.15.2, 6.3.1, 6.4, 6.5
-
None
-
Windows 10 21H2.
-
-
d46f317c8e (qt/qtbase/dev) d46f317c8e (qt/tqtc-qtbase/dev) 41e488c2fc (qt/qtbase/6.4) 41e488c2fc (qt/tqtc-qtbase/6.4)
Description
When undocking a QDockWidget from a main window, the position of the dock relative to the cursor is offset from the top left of the widget, rather than the top left of the native window decorations.
Before undocking:
Once undocked:
Notice the cursor is no longer over the titlebar, but displaying over the first row. The dock itself shifted up, whereas I actually dragged the dock downwards.
Reproduced in Qt Creator's "Dock Widgets Example" example app for Qt 6.3.1. Verified on both Windows and macOS.
Manually confirmed the issue did not exist in 5.7, but does in 5.9 and above. Looked through commits for qdockwidget and I believe it's caused by https://github.com/qt/qtbase/commit/99ce1d3d97c0423c3ee63ccf58deed964db0770e
My personal guess is the commit does improve behaviour for custom titlebars (untested), but misbehaves with native decorations.