summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
authorSergio Martins <sergio.martins@kdab.com>2018-07-11 14:01:10 +0100
committerSérgio Martins <sergio.martins@kdab.com>2018-07-17 11:24:29 +0000
commit856284d525f7c7958e76843cac46d718f5325275 (patch)
treef2da679dc99077a5a2212356b78f69d9d307f008 /src/widgets/styles
parent37bd2400fa0f36c8f7ef7cbb06d0f05e15356b5b (diff)
Reset geometry constraints when removing stylesheet
CSS geometry constraints such as "min-height" or "min-width" will set size constraints on the widget. Removing the stylesheet should remove these constraints. Task-Id: QTBUG-69418 Change-Id: I1008e4390281c90112303d72dd7d59a8acddfcd9 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 94509f621e..c046ac52f9 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -2905,10 +2905,7 @@ void QStyleSheetStyle::unpolish(QWidget *w)
styleSheetCaches->renderRulesCache.remove(w);
styleSheetCaches->styleSheetCache.remove(w);
unsetPalette(w);
- w->setProperty("_q_stylesheet_minw", QVariant());
- w->setProperty("_q_stylesheet_minh", QVariant());
- w->setProperty("_q_stylesheet_maxw", QVariant());
- w->setProperty("_q_stylesheet_maxh", QVariant());
+ setGeometry(w);
w->setAttribute(Qt::WA_StyleSheet, false);
QObject::disconnect(w, 0, this, 0);
#if QT_CONFIG(scrollarea)