diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index b2bc02399f..81c68057ee 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -61,6 +61,7 @@ private slots: void basicDTZ(); void bindToValueType(); void bindingExpression(); + void bindingToScriptStringProperty(); void blockComments(); void boolCoercions(); void boolPointerMerge(); @@ -952,6 +953,20 @@ void tst_QmlCppCodegen::bindingExpression() } } +void tst_QmlCppCodegen::bindingToScriptStringProperty() +{ + QQmlEngine engine; + QQmlComponent c(&engine, QUrl(u"qrc:/qt/qml/TestTypes/BindingToScriptStringProperty.qml"_s)); + QVERIFY2(c.isReady(), qPrintable(c.errorString())); + QScopedPointer<QObject> o(c.create()); + QVERIFY(o); + + const auto *bottomRect = o->findChild<QObject *>("bottom"); + QCOMPARE(bottomRect->property("y").toInt(), 150); + o->setProperty("c", true); + QCOMPARE(bottomRect->property("y").toInt(), 300); +} + void tst_QmlCppCodegen::blockComments() { QQmlEngine engine; |
