add navigation using enter + buttons will be clicked if enter (if but… (#556)
Enter navigation
This commit is contained in:
parent
16db23c159
commit
698cfe910c
32 changed files with 3655 additions and 4373 deletions
|
@ -12,6 +12,8 @@ import "../Controls2/TextTypes"
|
|||
PageType {
|
||||
id: root
|
||||
|
||||
defaultActiveFocusItem: hostname.textField
|
||||
|
||||
BackButtonType {
|
||||
id: backButton
|
||||
|
||||
|
@ -57,6 +59,8 @@ PageType {
|
|||
onFocusChanged: {
|
||||
textField.text = textField.text.replace(/^\s+|\s+$/g, '');
|
||||
}
|
||||
|
||||
KeyNavigation.tab: username.textField
|
||||
}
|
||||
|
||||
TextFieldWithHeaderType {
|
||||
|
@ -65,6 +69,8 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
headerText: qsTr("Login to connect via SSH")
|
||||
textFieldPlaceholderText: "root"
|
||||
|
||||
KeyNavigation.tab: secretData.textField
|
||||
}
|
||||
|
||||
TextFieldWithHeaderType {
|
||||
|
@ -85,15 +91,19 @@ PageType {
|
|||
onFocusChanged: {
|
||||
textField.text = textField.text.replace(/^\s+|\s+$/g, '');
|
||||
}
|
||||
|
||||
KeyNavigation.tab: continueButton
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
id: continueButton
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 24
|
||||
|
||||
text: qsTr("Continue")
|
||||
|
||||
onClicked: function() {
|
||||
clickedFunc: function() {
|
||||
forceActiveFocus()
|
||||
if (!isCredentialsFilled()) {
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue