disable pinch to zoom gesture

This commit is contained in:
Damien Elmes 2017-06-23 14:34:56 +10:00
parent e635157ee4
commit 7bd33242cf

View file

@ -92,6 +92,14 @@ class AnkiWebView(QWebEngineView):
context=Qt.WidgetWithChildrenShortcut, context=Qt.WidgetWithChildrenShortcut,
activated=fn) 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): def onEsc(self):
w = self.parent() w = self.parent()
while w: while w: