import QtQuick 1.0

Rectangle {
    id: page
    width: 300
    height: 300
    color: "grey"

    Component.onCompleted: {
        console.log("[qml] bar = " + bar)
        console.log("[qml] calling bar.baz(123)"); bar.baz(123)
        console.log("[qml] foo.bar = " + foo.bar)
        console.log("[qml] calling foo.bar.baz(123)"); foo.bar.baz(123)
    }

    Rectangle {
        width: 100
        height: 50
        color: "lightgrey"
        radius: 4

        anchors.centerIn: parent

        MouseArea {
            anchors.fill: parent
            onClicked: Qt.quit()
        }

        Text {
            anchors.centerIn: parent
            text: "Quit"
        }
    }
}
