fix: genKey binding and focus

This commit is contained in:
Jonathan Rainville 2020-06-01 10:36:06 -04:00 committed by Iuri Matias
parent 545bb751c1
commit 9fc93b8db2
2 changed files with 5 additions and 5 deletions

View File

@ -7,12 +7,14 @@ import "../shared"
import "../imports"
SwipeView {
property alias btnGenKey: btnGenKey
id: swipeView
anchors.fill: parent
currentIndex: 0
onCurrentItemChanged: {
currentItem.txtPassword.focus = true
currentItem.txtPassword.textField.focus = true
}
Item {
@ -135,9 +137,8 @@ SwipeView {
anchors.leftMargin: Theme.padding
anchors.left: parent.left
anchors.right: parent.right
otherProps: {
this.textField.focus = true
this.textField.focus
Component.onCompleted: {
this.textField.echoMode = TextInput.Password
}
Keys.onReturnPressed: {

View File

@ -17,7 +17,6 @@ Item {
inputValue.forceActiveFocus(Qt.MouseFocusReason)
}
readonly property int labelMargin: 7
property var otherProps // Only used to assign stuff to textField
id: inputBox
height: inputRectangle.height + (hasLabel ? inputLabel.height + labelMargin : 0)