diff options
author | Andy Shaw <andy.shaw@qt.io> | 2017-10-31 14:29:37 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2019-01-08 21:37:04 +0000 |
commit | e70230405dce5ac03817fc564a3a8ba5f208422a (patch) | |
tree | 569588632c89a67f418231901144f5801e2ca863 /src/widgets/styles/qstylesheetstyle.cpp | |
parent | c961d1a6d29af8ea385c042ec0d2d419e3bbfa84 (diff) |
Don't treat the ampersand in a titlebar as a mnemonic
As the mnemonic has no meaning when it is in a dockwidget title, we
should just treat it as a literal ampersand instead and display it
as such.
Fixes: QTBUG-54485
Change-Id: I96c856ce2771a68d226f48f8f47affc24f1c53cd
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/widgets/styles/qstylesheetstyle.cpp')
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 5ed7195b60..e261055c3c 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -4224,7 +4224,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 | Qt::TextShowMnemonic, dwOpt->palette, + alignment, dwOpt->palette, dwOpt->state & State_Enabled, titleText, QPalette::WindowText); |