summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml
blob: 60d4c442e4d5c640db202f9cb0633d2f65762b02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import QtQuick 1.0

Item{
    id: root
    property QtObject declarativerectangle : null
    property QtObject declarativeitem : null
    Component{id: a; Rectangle{} }
    Component{
        id: b
        Item{
            property bool testBool: false
            property int testInt: null
            property QtObject testObject: null
        }
    }

    Component.onCompleted: {
        root.declarativerectangle = a.createObject(root, {"x":17,"y":17, "color":"white"});
        root.declarativeitem = b.createObject(root, {"x":17,"y":17,"testBool":true,"testInt":17,"testObject":root});
    }
}