Clear SearchBox with ESC key

This commit is contained in:
donoban 2018-10-20 21:54:25 +02:00
parent ad1bcc55b9
commit 2347f75633
No known key found for this signature in database
GPG Key ID: 141310D8E3ED08A5

View File

@ -71,6 +71,11 @@ class SearchBox(QtGui.QLineEdit):
self.selectAll()
self.focusing = False
def keyPressEvent(self, event): # pylint: disable=invalid-name
if event.key() == QtCore.Qt.Key_Escape:
self.clear()
super(SearchBox, self).keyPressEvent(event)
class VmRowInTable:
# pylint: disable=too-few-public-methods