diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-09-02 17:28:05 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-09-02 17:28:16 +0200 |
commit | fba02cc8ae7fb71abb927a06a8e480f7909dc029 (patch) | |
tree | d32e2c1f0070ab49fc85cdc89b744f9925b4e614 /tests/auto/controls/data/tst_control.qml | |
parent | f6c3ecdb0646a4d83be5c07dd5369d0b0350260c (diff) | |
parent | 33904b63ce9971efc3763a0048a084ec3324dfc4 (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
Change-Id: I82da1e547c4ead1181ade19f77c62651c00998a3
Diffstat (limited to 'tests/auto/controls/data/tst_control.qml')
-rw-r--r-- | tests/auto/controls/data/tst_control.qml | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/tests/auto/controls/data/tst_control.qml b/tests/auto/controls/data/tst_control.qml index fc839493..0061440b 100644 --- a/tests/auto/controls/data/tst_control.qml +++ b/tests/auto/controls/data/tst_control.qml @@ -53,7 +53,12 @@ TestCase { Component { id: component - T.Control { } + Control { } + } + + Component { + id: rectangle + Rectangle { } } Component { @@ -877,4 +882,26 @@ TestCase { control.destroy() } + + function test_implicitSize() { + var control = component.createObject(testCase) + verify(control) + + compare(control.implicitWidth, 0) + compare(control.implicitHeight, 0) + + control.contentItem = rectangle.createObject(control, {implicitWidth: 10, implicitHeight: 20}) + compare(control.implicitWidth, 10) + compare(control.implicitHeight, 20) + + control.background = rectangle.createObject(control, {implicitWidth: 20, implicitHeight: 30}) + compare(control.implicitWidth, 20) + compare(control.implicitHeight, 30) + + control.padding = 100 + compare(control.implicitWidth, 210) + compare(control.implicitHeight, 220) + + control.destroy() + } } |