mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-26 14:00:08 +00:00
Fix context menus on Qt 5.9
This commit is contained in:
1 parent
dfefdc93c5
commit
e2774309fb
2 files changed
+14
-2
No files matched your search
+7
-1
@@ -134,7 +134,13 @@ GridView {
|
|||||||
acceptedButtons: Qt.RightButton
|
acceptedButtons: Qt.RightButton
|
||||||
onClicked: {
|
onClicked: {
|
||||||
// popup() ensures the menu appears under the mouse cursor
|
// popup() ensures the menu appears under the mouse cursor
|
||||||
appContextMenu.popup()
|
if (appContextMenu.popup) {
|
||||||
|
appContextMenu.popup()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Qt 5.9 doesn't have popup()
|
||||||
|
appContextMenu.open()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-1
@@ -192,7 +192,13 @@ GridView {
|
|||||||
onClicked: {
|
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
|
||||||
pcContextMenu.popup()
|
if (pcContextMenu.popup) {
|
||||||
|
pcContextMenu.popup()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Qt 5.9 doesn't have popup()
|
||||||
|
pcContextMenu.open()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user