aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qquickmaterialstyleconf
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qquickmaterialstyleconf')
-rw-r--r--tests/auto/qquickmaterialstyleconf/qtquickcontrols2.conf4
-rw-r--r--tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp10
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/auto/qquickmaterialstyleconf/qtquickcontrols2.conf b/tests/auto/qquickmaterialstyleconf/qtquickcontrols2.conf
index 78634834..30cee878 100644
--- a/tests/auto/qquickmaterialstyleconf/qtquickcontrols2.conf
+++ b/tests/auto/qquickmaterialstyleconf/qtquickcontrols2.conf
@@ -4,3 +4,7 @@ Style=Material
[Material]
Background=#444444
Foreground=Red
+Font\PixelSize=22
+
+[Material\Font]
+Family=Courier
diff --git a/tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp b/tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp
index cc81afea..17d1ea6d 100644
--- a/tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp
+++ b/tests/auto/qquickmaterialstyleconf/tst_qquickmaterialstyleconf.cpp
@@ -55,16 +55,22 @@ void tst_qquickmaterialstyleconf::conf()
{
QQuickApplicationHelper helper(this, QLatin1String("applicationwindow.qml"));
+ QFont customFont;
+ customFont.setFamily("Courier");
+ customFont.setPixelSize(22);
+
QQuickApplicationWindow *window = helper.appWindow;
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
- // We specified a custom background color, so the window should have it.
+ // We specified a custom background color and font, so the window should have them.
QCOMPARE(window->property("color").value<QColor>(), QColor("#444444"));
+ QCOMPARE(window->property("font").value<QFont>(), customFont);
- // We specified a custom foreground color, so the label should have it.
+ // We specified a custom foreground color and font, so the label should have them.
QQuickItem *label = window->property("label").value<QQuickItem*>();
QVERIFY(label);
QCOMPARE(label->property("color").value<QColor>(), QColor("#F44336"));
+ QCOMPARE(label->property("font").value<QFont>(), customFont);
}
QTEST_MAIN(tst_qquickmaterialstyleconf)