mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
add ctrl+c back to webview
This commit is contained in:
parent
2c45091367
commit
26ba52a752
1 changed files with 5 additions and 0 deletions
|
@ -52,6 +52,11 @@ class AnkiWebView(QWebView):
|
|||
self.connect(self, SIGNAL("loadFinished(bool)"), self._loadFinished)
|
||||
self._curKey = None
|
||||
self.allowDrops = False
|
||||
def keyPressEvent(self, evt):
|
||||
if evt.matches(QKeySequence.Copy):
|
||||
self.triggerPageAction(QWebPage.Copy)
|
||||
evt.accept()
|
||||
QWebView.keyPressEvent(self, evt)
|
||||
def keyReleaseEvent(self, evt):
|
||||
if self._keyHandler:
|
||||
if self._keyHandler(evt):
|
||||
|
|
Loading…
Reference in a new issue