-
Notifications
You must be signed in to change notification settings - Fork 13
/
Register.qml
77 lines (65 loc) · 1.92 KB
/
Register.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import QtQuick 2.0
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
Item {
id: root
signal rgst(string regKey)
// signal bugreport
signal nobtn
Component.onCompleted: textfield.forceActiveFocus()
MouseArea {
anchors.fill: parent
}
TextField {
width: parent.width*5/7
height: parent.height/20
anchors.top: parent.top
anchors.topMargin: parent.height/10
anchors.horizontalCenter: parent.horizontalCenter
Component.onCompleted: paste()
id: textfield
placeholderText: qsTr("Input your key, please.")
font.pixelSize: parent.width/20
// textColor: "orange"
horizontalAlignment: TextEdit.AlignHCenter
style: TextFieldStyle {
textColor: "orange"
background: Rectangle {
radius: 2
opacity: 0.1
implicitWidth: 100
implicitHeight: 24
border.color: "#333"
border.width: 1
}
}
}
Rectangle {
id: row
height: parent.height/15
width: parent.width*5/7
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: textfield.bottom
anchors.topMargin: parent.height/10
// antialiasing: false
color: "#88ffffff"
MyButton {
id: yesBtn
anchors.left: parent.left
width: parent.width/3
text: qsTr("Register")
anchors.bottom: parent.bottom
anchors.top: parent.top
onClicked: root.rgst(textfield.getText(0,12))
}
MyButton {
id: noBtn
anchors.right: parent.right
width: parent.width/3
text: qsTr("Cancel")
anchors.bottom: parent.bottom
anchors.top: parent.top
onClicked: root.nobtn()
}
}
}