Finish keyboard navigation for GridViews and MenuItems

This commit is contained in:
Cameron Gutman
2018-09-23 19:06:26 -07:00
parent 2e3de32810
commit 8fb37ae229
6 changed files with 30 additions and 7 deletions
+2 -2
View File
@@ -4,6 +4,8 @@ import QtQuick.Controls 2.2
ItemDelegate {
property GridView grid
highlighted: grid.activeFocus && grid.currentItem === this
Keys.onLeftPressed: {
grid.moveCurrentIndexLeft()
}
@@ -13,11 +15,9 @@ ItemDelegate {
Keys.onDownPressed: {
grid.moveCurrentIndexDown()
}
Keys.onUpPressed: {
grid.moveCurrentIndexUp()
}
Keys.onReturnPressed: {
clicked()
}