aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/data/asCastToInlineComponent.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data/asCastToInlineComponent.qml')
-rw-r--r--tests/auto/qml/qqmllanguage/data/asCastToInlineComponent.qml16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/asCastToInlineComponent.qml b/tests/auto/qml/qqmllanguage/data/asCastToInlineComponent.qml
new file mode 100644
index 0000000000..428ccd5eef
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/asCastToInlineComponent.qml
@@ -0,0 +1,16 @@
+import QtQml
+
+QtObject {
+ id: root
+
+ component MyItem: QtObject {
+ property int value: 10
+ onValueChanged: root.objectName = "value: " + value
+ }
+
+ property Instantiator i: Instantiator {
+ id: loader
+ delegate: MyItem {}
+ onObjectChanged: (loader.object as MyItem).value = 20
+ }
+}