QML学习
main.qml
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
Window {
width: 640
height: 480
visible: true
title: qsTr("SpinBox")
SpinBox {
id: spinBox
anchors.centerIn: parent
from: 0
to: 100
value: 50
stepSize: 20
editable: true
background: Rectangle {
implicitWidth: 200
implicitHeight: 100
border.width: 1
}
contentItem: Rectangle {
TextInput {
anchors.centerIn: parent
text: spinBox.value
font.pointSize: 30