summaryrefslogtreecommitdiff
path: root/tests/auto/declarative/qdeclarativeconnection/data/connection-targetchange.qml
blob: 154c309c9c363a44ed95222c41e6e918632046e3 (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 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
        onWidthChanged: loader.sourceComponent = item2
    }
}