Код IT Загрузка примера кода…

Plain text main.txt

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()
        }
    }
}