diff options
Diffstat (limited to 'tests/auto/quickcontrols2/qquickcontrol/tst_qquickcontrol.cpp')
-rw-r--r-- | tests/auto/quickcontrols2/qquickcontrol/tst_qquickcontrol.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/quickcontrols2/qquickcontrol/tst_qquickcontrol.cpp b/tests/auto/quickcontrols2/qquickcontrol/tst_qquickcontrol.cpp index 9086d958b0..ca6183e41d 100644 --- a/tests/auto/quickcontrols2/qquickcontrol/tst_qquickcontrol.cpp +++ b/tests/auto/quickcontrols2/qquickcontrol/tst_qquickcontrol.cpp @@ -23,6 +23,7 @@ private slots: void initTestCase() override; void flickable(); void fractionalFontSize(); + void resizeBackgroundKeepsBindings(); private: QScopedPointer<QPointingDevice> touchDevice; @@ -91,6 +92,20 @@ void tst_QQuickControl::fractionalFontSize() "The QQuickText::contentWidth() doesn't match the layout's preferred text width"); } +void tst_QQuickControl::resizeBackgroundKeepsBindings() +{ + QQuickApplicationHelper helper(this, QStringLiteral("resizeBackgroundKeepsBindings.qml")); + QQuickWindow *window = helper.window; + window->show(); + QVERIFY(QTest::qWaitForWindowExposed(window)); + auto ctxt = qmlContext(window); + QVERIFY(ctxt); + auto background = qobject_cast<QQuickItem *>(ctxt->objectForName("background")); + QVERIFY(background); + QCOMPARE(background->height(), 4); + QVERIFY(background->bindableHeight().hasBinding()); +} + QTEST_QUICKCONTROLS_MAIN(tst_QQuickControl) #include "tst_qquickcontrol.moc" |