aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controls/data/tst_label.qml24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_label.qml b/tests/auto/controls/data/tst_label.qml
index 5618fe07..69d273a7 100644
--- a/tests/auto/controls/data/tst_label.qml
+++ b/tests/auto/controls/data/tst_label.qml
@@ -66,6 +66,18 @@ TestCase {
}
Component {
+ id: backgroundLabel
+ Label {
+ background: Rectangle { }
+ }
+ }
+
+ Component {
+ id: rectangle
+ Rectangle { }
+ }
+
+ Component {
id: signalSpy
SignalSpy { }
}
@@ -115,4 +127,16 @@ TestCase {
compare(child.font[data.tag], defaultValue)
compare(childSpy.count, 0)
}
+
+ function test_background() {
+ var control = createTemporaryObject(backgroundLabel, testCase, {text: "Label"})
+ verify(control)
+
+ compare(control.background.width, control.width)
+ compare(control.background.height, control.height)
+
+ control.background = rectangle.createObject(control)
+ compare(control.background.width, control.width)
+ compare(control.background.height, control.height)
+ }
}