Better keyboard navigation

master
Carl Schwan 2020-11-10 10:14:14 +01:00 committed by Johan Ouwerkerk
parent 74ca38d318
commit abd2319a34
1 changed files with 3 additions and 0 deletions

View File

@ -28,16 +28,19 @@ Kirigami.ScrollablePage {
id: newPassword
text: ""
Kirigami.FormData.label: i18nc("@label:textbox", "New password:")
onAccepted: newPasswordCopy.forceActiveFocus()
}
Kirigami.PasswordField {
id: newPasswordCopy
text: ""
Kirigami.FormData.label: i18nc("@label:textbox", "Verify password:")
onAccepted: applyAction.trigger()
}
}
}
actions.main : Kirigami.Action {
id: applyAction
text: i18n("Apply")
iconName: "answer-correct"
enabled: newPassword.text === newPasswordCopy.text && newPassword.text && newPassword.text.length > 0