summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qcommonstyle.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2024-01-04 21:21:43 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2024-01-04 21:21:43 +0200
commit4e158f6bfa7d0747d8da70b3b15a44b52e35bb8a (patch)
tree84e20982138de5c9b6d319bf83ac79bd672f918f /src/widgets/styles/qcommonstyle.cpp
parente4391422574aa9aa89fece74f16c07c609cbbae2 (diff)
parenta13fd415d689be046c13cc562cbbbb5df0e6506a (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.13' into tqtc/lts-5.15-opensourcev5.15.13-lts-lgpl5.15
Diffstat (limited to 'src/widgets/styles/qcommonstyle.cpp')
-rw-r--r--src/widgets/styles/qcommonstyle.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 502a527901..a79c33005c 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -1708,8 +1708,9 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
alignment |= Qt::TextHideMnemonic;
rect.translate(shiftX, shiftY);
p->setFont(toolbutton->font);
+ const QString text = d->toolButtonElideText(toolbutton, rect, alignment);
proxy()->drawItemText(p, rect, alignment, toolbutton->palette,
- opt->state & State_Enabled, toolbutton->text,
+ opt->state & State_Enabled, text,
QPalette::ButtonText);
} else {
QPixmap pm;