diff options
-rw-r--r-- | src/quicktemplates2/qquickcontrol.cpp | 1 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_popup.qml | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp index 809c9f94..8d571c34 100644 --- a/src/quicktemplates2/qquickcontrol.cpp +++ b/src/quicktemplates2/qquickcontrol.cpp @@ -1320,6 +1320,7 @@ void QQuickControl::componentComplete() d->executeBackground(true); d->executeContentItem(true); QQuickItem::componentComplete(); + d->resizeBackground(); d->resizeContent(); if (!d->hasLocale) d->locale = QQuickControlPrivate::calcLocale(d->parentItem); diff --git a/tests/auto/controls/data/tst_popup.qml b/tests/auto/controls/data/tst_popup.qml index bec50ad0..1f3a097f 100644 --- a/tests/auto/controls/data/tst_popup.qml +++ b/tests/auto/controls/data/tst_popup.qml @@ -1253,4 +1253,12 @@ TestCase { control.open() verify(control.visible) } + + function test_deferredBackgroundSize() { + var control = createTemporaryObject(popupControl, testCase, {width: 200, height: 100}) + verify(control) + + compare(control.background.width, 200) + compare(control.background.height, 100) + } } |