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:
Kovid Goyal 2016-10-03 13:19:47 +05:30
parent 2be19e90ce
commit 49a1de252a

View File

@ -211,7 +211,10 @@ class Completer(QListView): # {{{
# self.debug_event(e) # self.debug_event(e)
if etype == e.KeyPress: if etype == e.KeyPress:
key = e.key() try:
key = e.key()
except AttributeError:
return QObject.eventFilter(self, obj, e)
if key == Qt.Key_Escape: if key == Qt.Key_Escape:
self.hide() self.hide()
e.accept() e.accept()