← Каталог
Qt Quick — первая программа на QML — Main.qml — разбор
Фрагмент из «Qt Quick — первая программа на QML»: Main.qml — разбор.
import QtQuick
import QtQuick.Controls
ApplicationWindow {
width: 360
height: 200
visible: true
title: "Qt Quick Hello"
Column {
anchors.centerIn: parent
spacing: 12
Label {
text: "Значение: " + counter.value
}
Button {
text: "+1"
onClicked: counter.increment()
}
}
}
import QtQuick
import QtQuick.Controls
ApplicationWindow {
width: 360
height: 200
visible: true
title: "Qt Quick Hello"
Column {
anchors.centerIn: parent
spacing: 12
Label {
text: "Значение: " + counter.value
}
Button {
text: "+1"
onClicked: counter.increment()
}
}
}