Skip to content
Snippets Groups Projects
Commit dda6d04f authored by Yann Lochet's avatar Yann Lochet Committed by Steve Lhomme
Browse files

qml: trigger right-click action on touchscreen long press

parent 54a03008
No related branches found
No related tags found
1 merge request!3151qml: trigger right-click action on touchscreen long press
Pipeline #307212 passed with stage
in 19 minutes and 30 seconds
......@@ -275,6 +275,10 @@ T.Control {
moveSelected()
}
}
onLongPressed: {
contextMenu.popup(index, point.scenePosition)
}
}
}
......
......@@ -215,6 +215,10 @@ T.Control {
root.itemClicked(picture, Qt.LeftButton, Qt.NoModifier)
root.itemDoubleClicked(picture, Qt.LeftButton, Qt.NoModifier)
}
onLongPressed: {
contextMenuButtonClicked(picture, point.scenePosition);
}
}
MouseHoverHandlerCompat {
......
......@@ -163,6 +163,10 @@ T.Control {
delegate.selectAndFocus(Qt.NoModifier, Qt.MouseFocusReason)
delegate.itemDoubleClicked(delegate._index, delegate.rowModel)
}
onLongPressed: {
delegate.rightClick(delegate, delegate.rowModel, point.scenePosition)
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment