fix: genKey binding and focus
This commit is contained in:
parent
545bb751c1
commit
9fc93b8db2
|
@ -7,12 +7,14 @@ import "../shared"
|
||||||
import "../imports"
|
import "../imports"
|
||||||
|
|
||||||
SwipeView {
|
SwipeView {
|
||||||
|
property alias btnGenKey: btnGenKey
|
||||||
|
|
||||||
id: swipeView
|
id: swipeView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
currentIndex: 0
|
currentIndex: 0
|
||||||
|
|
||||||
onCurrentItemChanged: {
|
onCurrentItemChanged: {
|
||||||
currentItem.txtPassword.focus = true
|
currentItem.txtPassword.textField.focus = true
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -135,9 +137,8 @@ SwipeView {
|
||||||
anchors.leftMargin: Theme.padding
|
anchors.leftMargin: Theme.padding
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
otherProps: {
|
|
||||||
this.textField.focus = true
|
Component.onCompleted: {
|
||||||
this.textField.focus
|
|
||||||
this.textField.echoMode = TextInput.Password
|
this.textField.echoMode = TextInput.Password
|
||||||
}
|
}
|
||||||
Keys.onReturnPressed: {
|
Keys.onReturnPressed: {
|
||||||
|
|
|
@ -17,7 +17,6 @@ Item {
|
||||||
inputValue.forceActiveFocus(Qt.MouseFocusReason)
|
inputValue.forceActiveFocus(Qt.MouseFocusReason)
|
||||||
}
|
}
|
||||||
readonly property int labelMargin: 7
|
readonly property int labelMargin: 7
|
||||||
property var otherProps // Only used to assign stuff to textField
|
|
||||||
|
|
||||||
id: inputBox
|
id: inputBox
|
||||||
height: inputRectangle.height + (hasLabel ? inputLabel.height + labelMargin : 0)
|
height: inputRectangle.height + (hasLabel ? inputLabel.height + labelMargin : 0)
|
||||||
|
|
Loading…
Reference in New Issue