mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 03:32:34 +08:00
be03b04ef0
- 修复了虚拟牌点数相加的bug - 修复cleaner出错直接爆炸 - QML的代码将宽度控制到80以内
53 lines
868 B
QML
53 lines
868 B
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
|
|
ColumnLayout {
|
|
id: root
|
|
anchors.fill: parent
|
|
anchors.margins: 16
|
|
signal finished()
|
|
signal accepted(string result)
|
|
|
|
property string head
|
|
property string hint
|
|
|
|
Text {
|
|
text: qsTr(head)
|
|
font.pixelSize: 20
|
|
font.bold: true
|
|
Layout.fillWidth: true
|
|
wrapMode: Text.WordWrap
|
|
}
|
|
|
|
Text {
|
|
text: qsTr(hint)
|
|
Layout.fillWidth: true
|
|
wrapMode: Text.WordWrap
|
|
}
|
|
|
|
Text {
|
|
text: qsTr("validator_hint")
|
|
Layout.fillWidth: true
|
|
wrapMode: Text.WordWrap
|
|
}
|
|
|
|
TextField {
|
|
id: edit
|
|
font.pixelSize: 18
|
|
Layout.fillWidth: true
|
|
validator: RegularExpressionValidator {
|
|
regularExpression: /[0-9A-Za-z_]+/
|
|
}
|
|
}
|
|
|
|
Button {
|
|
text: "OK"
|
|
enabled: edit.text.length >= 4
|
|
onClicked: {
|
|
accepted(edit.text);
|
|
finished();
|
|
}
|
|
}
|
|
}
|