Partially working keyboard navigation support
This commit is contained in:
parent
f2e40889b2
commit
2e3de32810
6 changed files with 91 additions and 8 deletions
18
app/gui/NavigableToolButton.qml
Normal file
18
app/gui/NavigableToolButton.qml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.2
|
||||
|
||||
ToolButton {
|
||||
activeFocusOnTab: true
|
||||
|
||||
Keys.onReturnPressed: {
|
||||
clicked()
|
||||
}
|
||||
|
||||
Keys.onRightPressed: {
|
||||
nextItemInFocusChain(true).forceActiveFocus(Qt.TabFocus)
|
||||
}
|
||||
|
||||
Keys.onLeftPressed: {
|
||||
nextItemInFocusChain(false).forceActiveFocus(Qt.TabFocus)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue