import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Window 2.12
Window {
width: 640
height: 480
visible: true
title: qsTr("Hello World")
Row{
width: parent.width - 20
anchors.centerIn: parent
spacing: 10
Repeater{
id: _repeater
model: 6
delegate: Label{
id: _label
property bool hasFocus: false
width: 48
height: 48
lineHeight: 46
lineHeightMode: Text.FixedHeight
font.pixelSize: 24
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.weight: Font.Bold
background: Rectangle{
border.width: 1
border.color: _label.hasFocus ? "#409EFF" : "#ccc"
radius: 3
}
qml 验证码输入框
最新推荐文章于 2023-08-15 17:02:26 发布