Fix tab navigation

This commit is contained in:
Timotej Lazar 2021-09-16 16:57:45 +02:00
parent b5ae104bcd
commit 17a7e0108b
No known key found for this signature in database
GPG key ID: B6F38793D143456F
4 changed files with 5 additions and 10 deletions

View file

@ -15,7 +15,6 @@ ListView {
signal selected(var event)
clip: true
focus: true
highlightMoveDuration: 0
highlightResizeDuration: 0
@ -46,10 +45,6 @@ ListView {
editing = false
model.remove(currentIndex)
break
case Qt.Key_Tab:
case Qt.Key_Backtab:
// swallow tabs so we dont lose focus when editing
break
default:
return
}
@ -94,8 +89,8 @@ ListView {
model.values = values
}
// Try passing key to each field input in order. If none can
// handle it, pass it to control.
// Pass the key to parent first to check if Video handles it.
// If not, try passing it to each field input when editing.
Keys.forwardTo: Array.prototype.concat(control, editing ? inputs.items : [])
onClicked: {