This commit is contained in:
Kovid Goyal 2017-07-22 17:44:11 +05:30
parent 166aa99b27
commit 91f37ca343
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -648,6 +648,7 @@ def handle_gesture(ev, view):
return True return True
th = ev.gesture(Qt.TapAndHoldGesture) th = ev.gesture(Qt.TapAndHoldGesture)
if th and th.state() in (Qt.GestureStarted, Qt.GestureUpdated, Qt.GestureFinished): if th and th.state() in (Qt.GestureStarted, Qt.GestureUpdated, Qt.GestureFinished):
if th.state() == Qt.GestureFinished:
send_click(view, th.position(), button=Qt.RightButton) send_click(view, th.position(), button=Qt.RightButton)
ev.accept(Qt.TapAndHoldGesture) ev.accept(Qt.TapAndHoldGesture)
return True return True