diff --git a/wincuts.py b/wincuts.py index 953c7e7..85e6406 100644 --- a/wincuts.py +++ b/wincuts.py @@ -122,6 +122,7 @@ def initUI(self): layout.addWidget(self.button_help) # Add Help button to the layout self.setLayout(layout) + def show_help(self): help_dialog = HelpDialog() help_dialog.exec_() @@ -176,6 +177,10 @@ def __init__(self, shortcut_manager): super().__init__() self.shortcut_manager = shortcut_manager self.initUI() + + def show_help(self): + help_dialog = HelpDialog() + help_dialog.exec_() def initUI(self): self.setWindowTitle("Shortcut Manager") @@ -194,6 +199,7 @@ def initUI(self): open_action.triggered.connect(self.show) quit_action.triggered.connect(self.quit) + help_action.triggered.connect(self.show_help) # Connect help action to show_help tray_menu.addAction(open_action) tray_menu.addAction(help_action) # Add help action to tray menu @@ -208,6 +214,8 @@ def initUI(self): self.shortcut_editor.list_shortcuts() self.listen_shortcuts() + + def closeEvent(self, event): event.ignore() self.hide()