summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeqt/data/createComponent.qml
blob: 9d0dd345ce5a47ff6922a5a7d8ac0421b6046a82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import QtQuick 1.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;
    }
}