summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlecmascript/data/dynamicCreation.qml
blob: ed5e571cb3e5779cf20d97ca4528ecd861169456 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Qt.test 1.0

MyQmlObject{
    id: obj
    objectName: "obj"
    function createOne()
    {
        obj.objectProperty = createQmlObject('import Qt.test 1.0; MyQmlObject{objectName:"objectOne"}', obj);
    }

    function createTwo()
    {
        var component = createComponent('dynamicCreation.helper.qml');
        obj.objectProperty = component.createObject();
    }

    function createThree()
    {
        obj.objectProperty = createQmlObject('TypeForDynamicCreation{}', obj);
    }
}