Created attachment 177309 [details] Example project and screenshot SUMMARY When using a point size of less than 10, GroupBox captions are truncated. STEPS TO REPRODUCE Create a QGroupBox widget with caption "GroupBox1" and a Noto Sans font with a point size of 8. I've attached an example project exhibiting the problem. OBSERVED RESULT The centered GroupBox caption text is truncated at the left and right. The lower the size, the more pronounced the truncation. It seems the actual font size does not go down, only the width determined via QFontMetrics.size goes down, causing the truncation. The attachment contains a screenshot. EXPECTED RESULT The caption is legible in its entirety. With the 'Fusion' and 'Windows' qt styles, it's working as expected. SOFTWARE/OS VERSIONS Linux/KDE Plasma: EndeavourOS, kernel 6.12.8, Wayland KDE Plasma Version: 6.2.5 KDE Frameworks Version: 6.9.0 Qt Version: 6.8.1 ADDITIONAL INFORMATION The logicalDotsPerInch values of my screen are all 96, screen scale factor in KDE settings is 100%.
I can confirm the issue, we are also seeing it in Kdenlive. Problem seems to be that with the Breeze style, when using a specific font, the QGroupBox title does not use the correct font and keeps a default large font.
Created attachment 180841 [details] QGroupBox font issue You can see in the screenshot that with the Breeze style, an incorrect font is used, while with Fusion style it uses the correct one
This is using: KDE Frameworks: 6.12.0 Plasma: 6.3.4 Qt: Using 6.9.0 and built against 6.9.0 Manjaro Linux (Wayland)
A possibly relevant merge request was started @ https://invent.kde.org/plasma/breeze/-/merge_requests/541
Git commit 9f6f7eb6f2bf61b66f0712e5975c5ed6ba2465f3 by Kai Uwe Broulik. Committed on 01/05/2025 at 16:06. Pushed by broulik into branch 'master'. kstyle: Take into account widget font when drawing QGroupBox We do it when calculating the metrics but not when actually drawing the widget, causing it to draw out of bounds when there's a custom font. M +1 -1 kstyle/breezestyle.cpp https://invent.kde.org/plasma/breeze/-/commit/9f6f7eb6f2bf61b66f0712e5975c5ed6ba2465f3