Sunday, July 14, 2013

Hello Qt Quick 2 Application

Use Project Wizard of Qt creator to new a Qt Quick 2 Application, that can contain both QML and C++ code and includes a QQuickView.








Default main.qml generated:
import QtQuick 2.0

Rectangle {
    width: 360
    height: 360
    Text {
        text: qsTr("Hello World")
        anchors.centerIn: parent
    }
    MouseArea {
        anchors.fill: parent
        onClicked: {
            Qt.quit();
        }
    }
}