aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_label.qml
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-04-14 01:00:27 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2018-04-14 15:09:05 +0000
commit28ab81f2c02378735ff82a6e130f0d38d6471069 (patch)
treece6df68f10c222929054f8f8916c669ab7e362cc /tests/auto/controls/data/tst_label.qml
parent704625a034270739e886a28bfa6e8889c8ad984b (diff)
parent625a7d1a5cb0b808a734ee7ea1e268c409417349 (diff)
Merge "Merge remote-tracking branch 'origin/5.11' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto/controls/data/tst_label.qml')
-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)
+ }
}