mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Close search panel when Esc is pressed
This commit is contained in:
parent
bfba63b246
commit
b8bb775a1b
@ -292,3 +292,10 @@ class SearchPanel(QWidget):
|
||||
ans = regex_cache[(flags, raw)] = regex.compile(raw, flags=flags)
|
||||
return ans
|
||||
|
||||
def keyPressEvent(self, ev):
|
||||
if ev.key() == Qt.Key_Escape:
|
||||
self.hide_panel()
|
||||
ev.accept()
|
||||
else:
|
||||
return QWidget.keyPressEvent(self, ev)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user