From 7bd33242cf92afc7a871b24d423cb1519d62897f Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 23 Jun 2017 14:34:56 +1000 Subject: [PATCH] disable pinch to zoom gesture --- aqt/webview.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aqt/webview.py b/aqt/webview.py index cf551e100..14778774a 100644 --- a/aqt/webview.py +++ b/aqt/webview.py @@ -92,6 +92,14 @@ class AnkiWebView(QWebEngineView): context=Qt.WidgetWithChildrenShortcut, activated=fn) + self.focusProxy().installEventFilter(self) + + def eventFilter(self, obj, evt): + # disable pinch to zoom gesture + if isinstance(evt, QNativeGestureEvent): + return True + return False + def onEsc(self): w = self.parent() while w: