update QAbstractButton geometry before updating it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-05-14 12:58:14 +03:00
parent a8068fc969
commit ba2536a22c

View file

@ -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