aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeqt/data/createComponent.qml
blob: 3ebc9f14f847855ce61d9838f9b6ac2eca96ca86 (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

QtObject {
    property bool emptyArg: false

    property string relativeUrl
    property string absoluteUrl

    property QtObject incorectArgCount1: Qt.createComponent()
    property QtObject incorectArgCount2: Qt.createComponent("main.qml", 10)

    Component.onCompleted: {
        emptyArg = (Qt.createComponent("") == null);
        var r = Qt.createComponent("createComponentData.qml");
        relativeUrl = r.url;

        var a = Qt.createComponent("http://www.example.com/test.qml");
        absoluteUrl = a.url;
    }
}