aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qquickloader/data/initialPropertyValues.6.qml
blob: 66452b512b7c2c39a6eaf187c3fa91db1767a88e (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 {
    id: root
    property int initialValue: 0
    property int behaviorCount: 0

    Loader {
        id: loader
        objectName: "loader"
        onLoaded: {
            root.initialValue = loader.item.canary;         // should be six
            root.behaviorCount = loader.item.behaviorCount; // should be zero
        }
    }

    Item {
        id: child
        property int bindable: 6
    }

    Component.onCompleted: {
        loader.setSource("InitialPropertyValuesComponent.qml", {"canary": child.bindable});
    }
}