diff options
author | Nikita Krupenko <krnekit@gmail.com> | 2016-05-15 04:48:29 +0300 |
---|---|---|
committer | Nikita Krupenko <krnekit@gmail.com> | 2016-05-18 14:00:29 +0000 |
commit | 9b682c12c443f799f5e38cf0a76acfc3754e9e56 (patch) | |
tree | 6bb1f4c73b4a77c1dea84fa1ec8fa1550a7d00f5 /tests/auto/controls/data/tst_stackview.qml | |
parent | 8f08885f8557099c2a37d4f3579e73f900a43cad (diff) |
StackView: reset size of the content without explicit one on pop()
This allows for item to be properly risezed by StackView when it'd be
pushed onto stack again.
Task-number: QTBUG-53067
Change-Id: I911026022a987ed5632ae5411d63221d743a6aca
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests/auto/controls/data/tst_stackview.qml')
-rw-r--r-- | tests/auto/controls/data/tst_stackview.qml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_stackview.qml b/tests/auto/controls/data/tst_stackview.qml index d8e1e722..9966fa47 100644 --- a/tests/auto/controls/data/tst_stackview.qml +++ b/tests/auto/controls/data/tst_stackview.qml @@ -243,10 +243,31 @@ TestCase { verify(container) var control = stackView.createObject(container, {width: 100, height: 100}) verify(control) + container.width += 10 container.height += 20 compare(control.width, 100) compare(control.height, 100) + + control.push(item, StackView.Immediate) + compare(item.width, control.width) + compare(item.height, control.height) + + control.width = 200 + control.height = 200 + compare(item.width, control.width) + compare(item.height, control.height) + + control.clear() + control.width += 10 + control.height += 20 + verify(item.width !== control.width) + verify(item.height !== control.height) + + control.push(item, StackView.Immediate) + compare(item.width, control.width) + compare(item.height, control.height) + container.destroy() } |