mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 21:53:29 +02:00
Workaround for some linux systems that appear to have a Qt theme/input method? plugin installed that generated QResizeEvents with type set to KeyPress
This commit is contained in:
parent
2be19e90ce
commit
49a1de252a
1 changed files with 4 additions and 1 deletions
|
|
@ -211,7 +211,10 @@ def eventFilter(self, obj, e):
|
|||
# self.debug_event(e)
|
||||
|
||||
if etype == e.KeyPress:
|
||||
key = e.key()
|
||||
try:
|
||||
key = e.key()
|
||||
except AttributeError:
|
||||
return QObject.eventFilter(self, obj, e)
|
||||
if key == Qt.Key_Escape:
|
||||
self.hide()
|
||||
e.accept()
|
||||
|
|
|
|||
Loading…
Reference in a new issue