Clear searchbox pressing esc without need of selecting it
This commit is contained in:
parent
4deaedd1e0
commit
b2bdae2c2d
@ -70,11 +70,6 @@ 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
|
||||
@ -479,6 +474,11 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
||||
timer.start(1000 * 30) # 30s
|
||||
self.check_updates()
|
||||
|
||||
def keyPressEvent(self, event): # pylint: disable=invalid-name
|
||||
if event.key() == QtCore.Qt.Key_Escape:
|
||||
self.searchbox.clear()
|
||||
super(VmManagerWindow, self).keyPressEvent(event)
|
||||
|
||||
def clear_threads(self):
|
||||
for thread in self.threads_list:
|
||||
if thread.isFinished():
|
||||
|
Loading…
Reference in New Issue
Block a user