Add Ctrl+F as keyboard shortcut to focus search box

This commit is contained in:
Jean-Philippe Ouellet 2016-12-14 17:29:44 -05:00
parent d128ffd133
commit 1e3a60e286
2 changed files with 14 additions and 0 deletions

View File

@ -310,6 +310,8 @@
<addaction name="separator"/>
<addaction name="action_showallvms"/>
<addaction name="action_showinternalvms"/>
<addaction name="separator"/>
<addaction name="action_search"/>
</widget>
<widget class="QMenu" name="menu_vm">
<property name="title">
@ -914,6 +916,14 @@
<string>Last back&amp;up</string>
</property>
</action>
<action name="action_search">
<property name="text">
<string>Search</string>
</property>
<property name="shortcut">
<string>Ctrl+F</string>
</property>
</action>
</widget>
<resources>
<include location="resources.qrc"/>

View File

@ -703,6 +703,10 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
self.showhide_vms()
self.set_table_geom_size()
@pyqtSlot(name='on_action_search_triggered')
def action_search_triggered(self):
self.searchbox.setFocus()
def mark_table_for_update(self):
self.reload_table = True