Fix shortcut focus issue?
This commit is contained in:
parent
6f7695ad22
commit
af17151c11
|
@ -5,6 +5,7 @@ Popup {
|
|||
id: popup
|
||||
anchors.centerIn: Overlay.overlay
|
||||
modal: true
|
||||
focus: true
|
||||
padding: 0
|
||||
|
||||
|
||||
|
|
|
@ -6,10 +6,16 @@ Item {
|
|||
Keys.onPressed: {
|
||||
let shortcut = match(event)
|
||||
if (! shortcut) return
|
||||
|
||||
event.accepted = true
|
||||
event.isAutoRepeat ? shortcut.held(event) : shortcut.pressed(event)
|
||||
}
|
||||
Keys.onReleased: {
|
||||
if (event.isAutoRepeat) return
|
||||
let shortcut = match(event)
|
||||
if (! shortcut) return
|
||||
|
||||
event.accepted = true
|
||||
if (shortcut && ! event.isAutoRepeat) shortcut.released(event)
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,9 @@ import "SidePane"
|
|||
|
||||
Item {
|
||||
id: mainUI
|
||||
focus: true
|
||||
Component.onCompleted: window.mainUI = mainUI
|
||||
Keys.forwardTo: [shortcuts]
|
||||
|
||||
property alias shortcuts: shortcuts
|
||||
property alias sidePane: sidePane
|
||||
|
|
|
@ -49,6 +49,7 @@ ApplicationWindow {
|
|||
asynchronous: false
|
||||
|
||||
anchors.fill: parent
|
||||
focus: true
|
||||
scale: py.ready ? 1 : 0.5
|
||||
source: py.ready ? (Qt.application.arguments[1] || "UI.qml") : ""
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user