Add long press action on PC view for touchscreens
This commit is contained in:
parent
1a45b8f07a
commit
b4bbd58c77
1 changed files with 14 additions and 10 deletions
|
|
@ -186,10 +186,7 @@ GridView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
onPressAndHold: {
|
||||||
anchors.fill: parent
|
|
||||||
acceptedButtons: Qt.RightButton;
|
|
||||||
onClicked: {
|
|
||||||
if (!model.addPc) {
|
if (!model.addPc) {
|
||||||
// popup() ensures the menu appears under the mouse cursor
|
// popup() ensures the menu appears under the mouse cursor
|
||||||
if (pcContextMenu.popup) {
|
if (pcContextMenu.popup) {
|
||||||
|
|
@ -201,6 +198,13 @@ GridView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.RightButton;
|
||||||
|
onClicked: {
|
||||||
|
parent.onPressAndHold()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onMenuPressed: {
|
Keys.onMenuPressed: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue