aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickloader/data/initialPropertyValues.8.qml
blob: fff67f361efb50de3f86d80ef700d80b0d0ce3a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import QtQuick 2.0

Item {
    id: root
    property int initialValue: 0

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

    Component.onCompleted: {
        loader.setSource("http://127.0.0.1:14458/InitialPropertyValuesComponent.qml", {"canary": 6});
        loader.active = true;
    }
}