summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qcommandlinkbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets/qcommandlinkbutton.cpp')
-rw-r--r--src/widgets/widgets/qcommandlinkbutton.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qcommandlinkbutton.cpp b/src/widgets/widgets/qcommandlinkbutton.cpp
index b6ec2a8d31..68dfefb3b7 100644
--- a/src/widgets/widgets/qcommandlinkbutton.cpp
+++ b/src/widgets/widgets/qcommandlinkbutton.cpp
@@ -318,7 +318,7 @@ QSize QCommandLinkButton::sizeHint() const
QSize size = QPushButton::sizeHint();
QFontMetrics fm(d->titleFont());
- int textWidth = qMax(fm.width(text()), 135);
+ int textWidth = qMax(fm.horizontalAdvance(text()), 135);
int buttonWidth = textWidth + d->textOffset() + d->rightMargin();
int heightWithoutDescription = d->descriptionOffset() + d->bottomMargin();