Qt-Advanced-Docking-System icon indicating copy to clipboard operation
Qt-Advanced-Docking-System copied to clipboard

Qt 6.9.0 + master result in broken windows on Ubuntu 22.04

Open FelixBer opened this issue 7 months ago • 6 comments

Building with current Qt-Advanced-Docking-System master or last release tag with Qt 6.9.0 works since my pr, but the issues go further.

  1. checkout and do a full build with Qt 6.9.0 or 6.8.3 or 6.7.3
  2. run ./x64/bin/CentralWidgetExample
  3. drag any tabbed widget out of its tabbing area
  4. the result is a broken and flickering main window:

System: Ubuntu 22.04.5 LTS Everything works fine on Windows 10.

It seems to be the same as #713

Image

FelixBer avatar Apr 25 '25 15:04 FelixBer

So it seems Qt6 + Ubuntu never worked. Qt5 is EOL next month, am I the only one using it on Linux? When I start dragging the tab, the indicators are already wrong / outside the actual window. When i drop the tab and start floating it, that's when the main window breaks like in my first screenshot. If i drop the tab inside an existing tab widget, it works fine (though I cant always drop it since the indicators are off).

Any ideas where I should start looking?

Image

FelixBer avatar Apr 27 '25 13:04 FelixBer

It seems that under Wayland there is no good way to get the current global cursor position, and indeed QCursor::pos() returns garbage on Qt6 + Wayland. Many things changed in the Qt Wayland backend from qt5 to qt6, though I am not sure why or how it worked in Qt5.

FelixBer avatar Apr 27 '25 21:04 FelixBer

@FelixBer In KDDockWidgets they use QDrag instead of mouse events for handling the dragging: https://github.com/KDAB/KDDockWidgets/blob/main/src/qtcommon/DragControllerWayland_p.cpp

Maybe this could also be a solution for ADS.

githubuser0xFFFF avatar Apr 28 '25 09:04 githubuser0xFFFF

ADS is using QCursor::pos() in several places. We could probably fix the dragging-preview of the floatingwidget by using QCursor::setPixmap(), but that still leaves many other cases like the orange drop indicators and probably more invisible internal things...

FelixBer avatar Apr 29 '25 17:04 FelixBer

KDAB seems to be using something->mapToGlobal(Qt5Qt6Compat::eventPos(ev))), that might be a short term solution?

jonjenssen avatar Jun 03 '25 12:06 jonjenssen

Thanks for looking into it, but that's just a wrapper to deal with QPoint/QPointF and mapToGlobal is what doesnt work inside QCursorPos, so it's the same result.

FelixBer avatar Jun 05 '25 20:06 FelixBer