#include <QApplication>#include <QQmlApplicationEngine>int main(int argc, char *argv[]){ QApplication app(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:///main.qml"))); return app.exec();}
import QtQuick 1.1import QtQuick.Controls 1.1import QtQuick.Window 2.0ApplicationWindow { id: appWindow title: qsTr("Hello World") width: 640 height: 480 Text { text: qsTr("Hello World") anchors.centerIn: parent }}
import QtQuick 2.2import QtQuick.Controls 1.1import QtQuick.Window 2.0ApplicationWindow { id: appWindow title: qsTr("Hello World") width: 640 height: 480 visible: true Text { text: qsTr("Hello World") anchors.centerIn: parent }}
import QtQuick 2.2import QtQuick.Controls 1.1ApplicationWindow { id: mainWindow visible: true width: 640 height: 480 title: qsTr("Hello World") menuBar: MenuBar { Menu { title: qsTr("File") MenuItem { text: qsTr("Exit") onTriggered: Qt.quit(); } } } Text { text: qsTr("Hello World") anchors.centerIn: parent } CheckBox { id: checkBox1 x: 54 y: 88 text: qsTr("Check Box") } ProgressBar { id: progressBar1 x: 228 y: 306 } LabelTypeYouInfo { anchors.left: mainWindow visible: true }}
import QtQuick 2.0Rectangle { id: myt width: 154 height: 45 gradient: Gradient { GradientStop { position: 0.439 color: "#ffffff" } GradientStop { position: 0.966 color: "#000000" } } Text { id: text1 x: 5 y: 14 text: qsTr("Укажите свои данные") font.pixelSize: 14 } LabelTypeYouInfo{ id: labelStepFirst visible: true }}