fix back navigation on default focus item
This commit is contained in:
parent
c962211068
commit
db5d289edc
1 changed files with 16 additions and 22 deletions
|
|
@ -38,28 +38,22 @@ Window {
|
||||||
|
|
||||||
focus: true
|
focus: true
|
||||||
|
|
||||||
Keys.onTabPressed: {
|
Keys.onPressed: function(event) {
|
||||||
FocusController.nextKeyTabItem()
|
switch (event.key) {
|
||||||
}
|
case Qt.Key_Tab:
|
||||||
|
case Qt.Key_Down:
|
||||||
Keys.onBacktabPressed: {
|
case Qt.Key_Right:
|
||||||
FocusController.previousKeyTabItem()
|
FocusController.nextKeyTabItem()
|
||||||
}
|
break
|
||||||
|
case Qt.Key_Backtab:
|
||||||
Keys.onUpPressed: {
|
case Qt.Key_Up:
|
||||||
FocusController.nextKeyUpItem()
|
case Qt.Key_Left:
|
||||||
}
|
FocusController.previousKeyTabItem()
|
||||||
|
break
|
||||||
Keys.onDownPressed: {
|
default:
|
||||||
FocusController.nextKeyDownItem()
|
PageController.keyPressEvent(event.key)
|
||||||
}
|
event.accepted = true
|
||||||
|
}
|
||||||
Keys.onLeftPressed: {
|
|
||||||
FocusController.nextKeyLeftItem()
|
|
||||||
}
|
|
||||||
|
|
||||||
Keys.onRightPressed: {
|
|
||||||
FocusController.nextKeyRightItem()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue