diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-04-23 11:42:37 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-04-23 15:49:31 +0000 |
commit | 7e3c882d9a5cd6a25f547091a4ece786f516f2a4 (patch) | |
tree | af93fed4a300b68933ceb749187649668c7d3976 /tests/auto | |
parent | 12e22e333d99d1a2fe9d878bb86108c87626e7ec (diff) |
Control: fix background size
Don't reset QQuickItemPrivate::widthValid and heightValid flags,
because that will cause the item to update its geometry when its
implicit size changes. Instead, keep track whether background has
an explicit size at the time of assignment, or if the background
changes its geometry outside of resizeBackground().
Task-number: QTBUG-66455
Change-Id: If14eeae6863f7e5e47ebf2d6dbdaf718fc8368d4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/controls/data/tst_control.qml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_control.qml b/tests/auto/controls/data/tst_control.qml index e5a7d093..5c66bd04 100644 --- a/tests/auto/controls/data/tst_control.qml +++ b/tests/auto/controls/data/tst_control.qml @@ -465,6 +465,12 @@ TestCase { compare(control.background.height, control.height) control.height = 240 + // change implicit size (QTBUG-66455) + control.background.implicitWidth = 160 + control.background.implicitHeight = 120 + compare(control.background.width, control.width) + compare(control.background.height, control.height) + // has width => width does not follow control.background.width /= 2 control.width += 20 |