diff options
Diffstat (limited to 'src/widgets/styles/qstylesheetstyle.cpp')
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 9fcb8ba522..55d95c7fb2 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -2441,11 +2441,12 @@ static QWidget *embeddedWidget(QWidget *w) } /** \internal - in case w is an embedded widget, return the container widget - (i.e, the widget for which the rules actualy apply) - (exemple, if w is a lineedit embedded in a combobox, return the combobox) + Returns the widget whose style rules apply to \a w. + + When \a w is an embedded widget, this is the container widget. + For example, if w is a line edit embedded in a combobox, this returns the combobox. + When \a w is not embedded, this function return \a w itself. - if w is not embedded, return w itself */ static QWidget *containerWidget(const QWidget *w) { @@ -2649,6 +2650,9 @@ void QStyleSheetStyle::setProperties(QWidget *w) default: v = decl.d->values.at(0).variant; break; } + if (propertyL1 == "styleSheet" && value == v) + continue; + w->setProperty(propertyL1, v); } } |