From 856284d525f7c7958e76843cac46d718f5325275 Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Wed, 11 Jul 2018 14:01:10 +0100 Subject: 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 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/widgets/styles/qstylesheetstyle.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/widgets/styles') 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) -- cgit v1.2.3