QCommandLinkButton: reload icon on style change
Different styles provide different icons for SP_CommandLink so reload the icon on every style change. Pick-to: 6.9 6.8 Change-Id: I2d8bd706d4c1bca89b91c90f1bb90a796b38e0d3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
1b84970b90
commit
d4c518b210
@ -276,6 +276,12 @@ QCommandLinkButton::~QCommandLinkButton()
|
||||
/*! \reimp */
|
||||
bool QCommandLinkButton::event(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::StyleChange) {
|
||||
QStyleOptionButton opt;
|
||||
initStyleOption(&opt);
|
||||
setIcon(style()->standardIcon(QStyle::SP_CommandLink, &opt, this));
|
||||
}
|
||||
|
||||
return QPushButton::event(e);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user