Debian Codegraph @

tests/auto/qml/qqmlconnections/data/functions/connection-targetchange.qml

raw
1 import QtQuick 2.0
2
3 Item {
4 Component {
5 id: item1
6 Item {
7 objectName: "item1"
8 }
9 }
10 Component {
11 id: item2
12 Item {
13 objectName: "item2"
14 }
15 }
16 Loader {
17 id: loader
18 sourceComponent: item1
19 }
20 Connections {
21 objectName: "connections"
22 target: loader.item
23 function onWidthChanged() { loader.sourceComponent = item2 }
24 }
25 }