summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeconnection/data/connection-targetchange.qml
blob: bb9a3bc0e77c27803a492d1e944e30c4d5be35c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import Qt 4.7

Item {
    Component {
        id: item1
        Item {
            objectName: "item1"
        }
    }
    Component {
        id: item2
        Item {
            objectName: "item2"
        }
    }
    Loader {
        id: loader
        sourceComponent: item1
    }
    Connections {
        objectName: "connections"
        target: loader.item
        onWidthChanged: loader.sourceComponent = item2
    }
}