native: login screen make enter work

This commit is contained in:
jopejoe1 2024-07-11 11:47:46 +02:00
parent 067402a0fd
commit b1f2f6507e

View file

@ -39,25 +39,29 @@ Rectangle {
id: nameT id: nameT
anchors{ anchors{
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
topMargin: 5 topMargin: 5
top: loginL.bottom top: loginL.bottom
} }
placeholderText: qsTr("Name") placeholderText: qsTr("Name")
Keys.onReturnPressed: passwordField.focus = true
} }
TextField { TextField {
id: passwordT id: passwordT
anchors{ anchors{
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
topMargin: 5 topMargin: 5
top: nameT.bottom top: nameT.bottom
} }
placeholderText: qsTr("Password") placeholderText: qsTr("Password")
Keys.onReturnPressed: login()
echoMode: TextInput.Password echoMode: TextInput.Password
} }