Hi,

Is that ok to set the parent of an object during the property
initialization?

For example:

// Foo.qml
Item {
    property alias container: frame

    Item {
        id: frame
        anchors.fill: parent
    }

    Rectangle {
        anchors.fill: parent
        color: "red"
        opacity: 0.5
    }
}

// main.qml
Foo {
    id: foo
    Rectangle {
        parent: foo.container
        color: "blue"
    }
}


QML would guarantee that the property would not be overwritten by the
initial parent?


Br,
Adriano
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to