Fix activation of right-click on touch devices
This commit is contained in:
parent
a0e659098d
commit
5058e3c13e
|
@ -110,12 +110,21 @@ HButton {
|
|||
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.RightButton
|
||||
acceptedPointerTypes: PointerDevice.GenericPointer
|
||||
onTapped: {
|
||||
rightClicked()
|
||||
if (contextMenu) contextMenuLoader.active = true
|
||||
}
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
acceptedPointerTypes: PointerDevice.Finger | PointerDevice.Pen
|
||||
onLongPressed: {
|
||||
rightClicked()
|
||||
if (contextMenu) contextMenuLoader.active = true
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
enabled: contextMenuLoader.status === Loader.Ready
|
||||
target: contextMenuLoader.item
|
||||
|
|
|
@ -106,9 +106,15 @@ HColumnLayout {
|
|||
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.RightButton
|
||||
acceptedPointerTypes: PointerDevice.GenericPointer
|
||||
onTapped: openContextMenu()
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
acceptedPointerTypes: PointerDevice.Finger | PointerDevice.Pen
|
||||
onLongPressed: openContextMenu()
|
||||
}
|
||||
|
||||
HMenu {
|
||||
id: contextMenu
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user