mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
86671138dc
commit
f38c453eaf
@ -412,7 +412,7 @@ class EditorWidget(QWebView, LineEditECM): # {{{
|
||||
self.page().setContentEditable(not self.readonly)
|
||||
|
||||
def event(self, ev):
|
||||
if ev.type() in (ev.KeyPress, ev.KeyRelease, ev.ShortcutOverride) and ev.key() in (
|
||||
if ev.type() in (ev.KeyPress, ev.KeyRelease, ev.ShortcutOverride) and hasattr(ev, 'key') and ev.key() in (
|
||||
Qt.Key_Tab, Qt.Key_Escape, Qt.Key_Backtab):
|
||||
if (ev.key() == Qt.Key_Tab and ev.modifiers() & Qt.ControlModifier and ev.type() == ev.KeyPress):
|
||||
self.exec_command('insertHTML', '<span style="white-space:pre">\t</span>')
|
||||
|
Loading…
x
Reference in New Issue
Block a user