From ba2536a22c0964849a73d4dd3fa47a16cd33390e Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Tue, 14 May 2024 12:58:14 +0300 Subject: [PATCH] update QAbstractButton geometry before updating it Signed-off-by: Ivailo Monev --- src/gui/widgets/qabstractbutton.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/qabstractbutton.cpp b/src/gui/widgets/qabstractbutton.cpp index 7beec6f40..f755d7e58 100644 --- a/src/gui/widgets/qabstractbutton.cpp +++ b/src/gui/widgets/qabstractbutton.cpp @@ -604,8 +604,8 @@ void QAbstractButton::setText(const QString &text) setShortcut(newMnemonic); #endif d->sizeHint = QSize(); - update(); updateGeometry(); + update(); } QString QAbstractButton::text() const @@ -627,8 +627,8 @@ void QAbstractButton::setIcon(const QIcon &icon) Q_D(QAbstractButton); d->icon = icon; d->sizeHint = QSize(); - update(); updateGeometry(); + update(); } QIcon QAbstractButton::icon() const