Created attachment 166549 [details] ampersands where titles are. In the screenshot attached, there are random ampersands (&) where underlined characters should be in Scenes/Sources etc. I was hitting it in Nobara first, so I spun up a vanilla fedora 40 VM and was able to reproduce it only happens with obs-studio + KDE 6 furthermore I can do XDG_CURRENT_DESKTOP=gnome and it works around the bug. After digging I found if I remove kf6-ki18n it fixes it. (forcefully via rpm -e --nodeps). Obv, not an actual fix but at least a lead on the cause. Original obs-studio bug report opened here: https://github.com/obsproject/obs-studio/issues/10341
Turns out this is a QT bug. Same bug listed here: https://bugreports.qt.io/browse/QTBUG-86407 The same fix from this commit: https://github.com/qt/qtbase/commit/cc67b25579c1bb5ea9f5c1ca4c9b7997e66f19b9 Also needs to be applied to QDockWidget inside qstylesheetstyle. obs-studio uses stylesheets so that clued me in: ``` From 519cfee1bb6c1477a2cc5efdb2c9997904ddcbed Mon Sep 17 00:00:00 2001 From: GloriousEggroll <gloriouseggroll@gmail.com> Date: Thu, 7 Mar 2024 01:28:08 -0700 Subject: [PATCH] fix underlined text in dock widget titles rendering as ampersands --- src/widgets/styles/qstylesheetstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 1ba8aa7c..37685b5f 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -4484,7 +4484,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q QString titleText = p->fontMetrics().elidedText(dwOpt->title, Qt::ElideRight, r.width()); drawItemText(p, r, - alignment, dwOpt->palette, + alignment | Qt::TextHideMnemonic, dwOpt->palette, dwOpt->state & State_Enabled, titleText, QPalette::WindowText); -- 2.44.0 ```
For additional reference I also noticed when loaded correctly in gnome it does not have underlined characters on the dock widget titles, so this should be the correct behavior for kde as well.
*** Bug 483488 has been marked as a duplicate of this bug. ***
I'm still seeing this issue in FreeCAD, with qt 6.7.2 which should already include the qt fix. Maybe this fix needs to be applied in breeze too?
maybe this would fix this? https://invent.kde.org/plasma/breeze/-/merge_requests/491