-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.8
-
None
-
-
3252e1808 (dev), ccf61c348 (6.9), 14aa698cc (dev), 9dcb39044 (6.10)
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:
- resulted in
-
QTBUG-139924 [REG Qt 6.9.2] Style Sheet is not always applied to children
-
- Closed
-
| 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 |
| 673495,4 | QWidget: fix propagating style with descendant selectors | dev | qt/qtbase | Status: MERGED | +2 | +1 |
| 678478,2 | QWidget: fix propagating style with descendant selectors | 6.10 | qt/qtbase | Status: MERGED | +2 | 0 |