mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-21 20:27:45 +00:00
Add simple username/password field
This commit is contained in:
parent
83be40cce1
commit
a007f8567e
1 changed files with 35 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.1
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Window 2.0
|
||||
|
||||
ApplicationWindow {
|
||||
|
@ -11,9 +11,40 @@ ApplicationWindow {
|
|||
visible: true
|
||||
|
||||
Label {
|
||||
text: "Hello, world!"
|
||||
id: usernameLabel
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "Username"
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: usernameField
|
||||
|
||||
anchors.top: usernameLabel.bottom
|
||||
}
|
||||
|
||||
Label {
|
||||
id: passwordLabel
|
||||
|
||||
text: "Password"
|
||||
|
||||
anchors.top: usernameField.bottom
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: passwordField
|
||||
|
||||
echoMode: TextInput.Password
|
||||
|
||||
anchors.top: passwordLabel.bottom
|
||||
}
|
||||
|
||||
Button {
|
||||
id: loginButton
|
||||
|
||||
text: "Login"
|
||||
|
||||
anchors.top: passwordField.bottom
|
||||
|
||||
onClicked: print("Hooray!");
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue