Hi all, this is one weird bug. I'm not completely sure if KWin is to blame, or if the problem resides elsewhere. I'm also not sure how to track this down. But I have a minimal example producing the problem reliably, so I hope you know ;-) The problem is that, using a Plasma 6 desktop and Noto Sans 10pt as the font, it happens that when tabifying QDockWidgets of a Qt 6 program, the resulting tab texts are sometimes cut off, although there would be enough space. Please see the screenshots I'll attach to see what I mean. This happens both with Breeze and Fusion, so I think it's no style issue. I can produce this exact behavior on my Gentoo desktop and also on my Artix notebook. Both running plasma 6.1.1, Gentoo with Qt 6.7.1, Artix with 6.7.2. This does not happen when using a Plasma 5 desktop, neither for a Qt 5 build, nor for a Qt 6 build. Everything is fine using Plasma 5. I tried this using a current KUbuntu in a QEMU VM. Both the Qt 5 and 6 builds of my demo don't cut off the text. But I could also reproduce this using am OpenSUSE Tumbleweed QEMU VM, running a Plasma 6 desktop. Here, the Qt 5 build looks fine, but the Qt 6 build cuts off the text, just as with my Gentoo and Artix machines. Interestingly, the cutoff does not happen when: - Another Font is used - Noto Sans is used, but another size (9 or 11) - The docks are not hidden first - The docks are hidden after a small delay, e.g. by a QTimer::singleShot waiting 100 ms (0 ms has the same result as hiding them directly) - The name of the cut off dock is slightly changed, e.g. from "Ergebnisse" to "ErgebnisseX", "Ergebnisse " or similar - The name of the "Extras" menu entry is changed, e.g. from "Extras" to "X" (how can that ever affect this at all?!) Well, as said, this is an odd one ... I'll attach the screenshots, one using Breeze and one using Fusion, as well as the minimal example producing the bug (as said, only when built against Qt 6, using Noto Sans 10pt and when run on a Plasma 6 desktop). I'd really love to help tracking this down if I can!
Created attachment 171210 [details] The cutoff text using Breeze
Created attachment 171211 [details] The cutoff text using Fusion
Created attachment 171212 [details] demo.pro
Created attachment 171213 [details] main.cpp
Created attachment 171214 [details] MainWindow.cpp
Created attachment 171215 [details] MainWindow.h
Since this affects QDockWidget (which is not KDE code) and also multiple QStyles (including non-KDE ones), I think it's safe to say this is a Qt 6 regression. Please report it at https://bugreports.qt.io/. That should be happy to see your test program!
I first was also pretty sure this was a Qt bug … I posted this at the Qt forums ( https://forum.qt.io/topic/157507/how-can-i-ensure-that-the-text-in-the-qtabbar-of-qdockwidgets-is-not-cut-off ), but they told me they could not reproduce it. I then played around with different window managers, and found the fact that it does not happen with Plasma 5, but with Plasma 6. So I thought this should be a KDE issue. Just to ask this before filing a Qt bug: Can you also see this?!