diff options
author | Louie S <louie@example.com> | 2023-09-16 09:36:14 -0400 |
---|---|---|
committer | Louie S <louie@example.com> | 2023-09-16 09:36:14 -0400 |
commit | 0ce1224da8c2007de9bdf7898341142897e0c64f (patch) | |
tree | d1e37b838b99c17892dbc90f71a273d1673a1708 /src/preferences_dialog.py | |
parent | 8650e59af3ecc0d77615f1f4fd2a8b78db6232d0 (diff) |
Implement reloading
Diffstat (limited to 'src/preferences_dialog.py')
-rw-r--r-- | src/preferences_dialog.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/preferences_dialog.py b/src/preferences_dialog.py index e8292d6..7f39fb7 100644 --- a/src/preferences_dialog.py +++ b/src/preferences_dialog.py @@ -41,6 +41,10 @@ class PreferencesDialog(QDialog): apply_button = QPushButton("Apply", self) apply_button.clicked.connect(self.apply) buttons_hbox.addWidget(apply_button) + + reload_button = QPushButton("Reload", self) + reload_button.clicked.connect(self.reload) + buttons_hbox.addWidget(reload_button) main_layout.addLayout(buttons_hbox) self.setLayout(main_layout) @@ -86,6 +90,12 @@ class PreferencesDialog(QDialog): self.config.updateConfig() + def reload(self): + """ + Update, reload, and close the window + """ + self.apply() + self.done(1) if __name__ == "__main__": app = QApplication(sys.argv) |