blob: 2fef03ac8406dc8608f4e241d2bf950a357575b2 (
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
26
27
|
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);
}
function dontCrash()
{
var component = createComponent('file-doesnt-exist.qml');
obj.objectProperty = component.createObject();
}
}
|