add typehint for eventFilter method
This commit is contained in:
parent
eb032c4efb
commit
99663be358
@ -75,7 +75,7 @@ class StudyDeck(QDialog):
|
||||
self.redraw("", current)
|
||||
self.exec_()
|
||||
|
||||
def eventFilter(self, obj, evt):
|
||||
def eventFilter(self, obj: QObject, evt: QEvent) -> bool:
|
||||
if evt.type() == QEvent.KeyPress:
|
||||
if evt.key() == Qt.Key_Up:
|
||||
c = self.form.list.count()
|
||||
|
@ -227,7 +227,7 @@ class AnkiWebView(QWebEngineView): # type: ignore
|
||||
activated=self.onPaste,
|
||||
)
|
||||
|
||||
def eventFilter(self, obj, evt):
|
||||
def eventFilter(self, obj: QObject, evt: QEvent) -> bool:
|
||||
# disable pinch to zoom gesture
|
||||
if isinstance(evt, QNativeGestureEvent):
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user