diff options
Diffstat (limited to 'tests/auto/widgets/styles/qstylesheetstyle')
-rw-r--r-- | tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp index c36f3ada01..39a568008a 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -106,6 +106,7 @@ private slots: void QTBUG36933_brokenPseudoClassLookup(); void styleSheetChangeBeforePolish(); void placeholderColor(); + void accentColor(); void enumPropertySelector_data(); void enumPropertySelector(); //at the end because it mess with the style. @@ -2360,6 +2361,15 @@ void tst_QStyleSheetStyle::placeholderColor() QCOMPARE(le1.palette().placeholderText().color(), QColor(phSpec)); } +void tst_QStyleSheetStyle::accentColor() +{ + QLineEdit lineEdit; + const QColor universe(42, 42, 42); + lineEdit.setStyleSheet(QString("QLineEdit { accent-color: %1; }").arg(universe.name())); + lineEdit.ensurePolished(); + QCOMPARE(lineEdit.palette().accentColor().color(), universe); +} + void tst_QStyleSheetStyle::enumPropertySelector_data() { QTest::addColumn<QString>("styleSheet"); |