mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
add evt type for contextMenuEvent method
This commit is contained in:
parent
eb032c4efb
commit
8f4469d5e9
2 changed files with 2 additions and 2 deletions
|
@ -1156,7 +1156,7 @@ class EditorWebView(AnkiWebView):
|
|||
mime.setHtml("<!--anki-->" + html)
|
||||
clip.setMimeData(mime)
|
||||
|
||||
def contextMenuEvent(self, evt) -> None:
|
||||
def contextMenuEvent(self, evt: QContextMenuEvent) -> None:
|
||||
m = QMenu(self)
|
||||
a = m.addAction(_("Cut"))
|
||||
qconnect(a.triggered, self.onCut)
|
||||
|
|
|
@ -268,7 +268,7 @@ class AnkiWebView(QWebEngineView): # type: ignore
|
|||
def onSelectAll(self):
|
||||
self.triggerPageAction(QWebEnginePage.SelectAll)
|
||||
|
||||
def contextMenuEvent(self, evt) -> None:
|
||||
def contextMenuEvent(self, evt: QContextMenuEvent) -> None:
|
||||
m = QMenu(self)
|
||||
a = m.addAction(_("Copy"))
|
||||
qconnect(a.triggered, self.onCopy)
|
||||
|
|
Loading…
Reference in a new issue