Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.8
-
None
-
-
3252e1808 (dev), ccf61c348 (6.9)
Description
When a style is calling QWidget::setWindowFlag() inside polish/unpolish to set e.g. Qt::NoDropShadowWindowHint it might create an endless loop when there is also a stylesheet involved.
main.cpp:
QComboBox cbx;
cbx.show();
a.setStyleSheet("blub");
Then add something like this in style polish/unpolsih (see e.g. https://codereview.qt-project.org/c/qt/qtbase/+/613492)
polish(QWidget* widget) { widget->setWindowFlag(Qt::NoDropShadowWindowHint, true); } unpolish(QWidget* widget) { widget->setWindowFlag(Qt::NoDropShadowWindowHint, false); }
This gives a stackoverflow like this:
Attachments
For Gerrit Dashboard: QTBUG-133332 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
616334,10 | QWidget: don't re-polish when style did not change | dev | qt/qtbase | Status: MERGED | +2 | 0 |
646929,2 | QWidget: don't re-polish when style did not change | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |