aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlconnections/data/functions/connection-targetchange.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlconnections/data/functions/connection-targetchange.qml')
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/connection-targetchange.qml25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlconnections/data/functions/connection-targetchange.qml b/tests/auto/qml/qqmlconnections/data/functions/connection-targetchange.qml
new file mode 100644
index 0000000000..692194e837
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/connection-targetchange.qml
@@ -0,0 +1,25 @@
+import QtQuick 2.0
+
+Item {
+ Component {
+ id: item1
+ Item {
+ objectName: "item1"
+ }
+ }
+ Component {
+ id: item2
+ Item {
+ objectName: "item2"
+ }
+ }
+ Loader {
+ id: loader
+ sourceComponent: item1
+ }
+ Connections {
+ objectName: "connections"
+ target: loader.item
+ function onWidthChanged() { loader.sourceComponent = item2 }
+ }
+}