summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-07-31 11:34:23 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2018-07-31 11:34:23 +0000
commitcf2d59bfe8720627e016195903e16cd0c97fa612 (patch)
tree5cc0755d649d606867bf6168a091a91c9d3e6f3d /tests/auto/widgets
parent7621bb0f3bba69e0b2849974a335dff4742c8e95 (diff)
parent23c9d4c98f3c6729b56700edc1d7144b444b16db (diff)
Merge "Merge branch '5.11' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
index 6a4d972baf..43aec651fe 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -99,6 +99,7 @@ private slots:
void appStyle();
void QTBUG11658_cachecrash();
void styleSheetTargetAttribute();
+ void unpolish();
private:
QColor COLOR(const QWidget& w) {
@@ -2054,6 +2055,17 @@ void tst_QStyleSheetStyle::styleSheetTargetAttribute()
QCOMPARE(pb.testAttribute(Qt::WA_StyleSheetTarget), false);
}
+void tst_QStyleSheetStyle::unpolish()
+{
+ QWidget w;
+ QCOMPARE(w.minimumWidth(), 0);
+ w.setStyleSheet("QWidget { min-width: 100; }");
+ w.ensurePolished();
+ QCOMPARE(w.minimumWidth(), 100);
+ w.setStyleSheet("");
+ QCOMPARE(w.minimumWidth(), 0);
+}
+
QTEST_MAIN(tst_QStyleSheetStyle)
#include "tst_qstylesheetstyle.moc"