Added functionality to the save button.
This commit is contained in:
parent
ab018494e9
commit
7c6566e9a1
2 changed files with 5 additions and 4 deletions
|
@ -10,9 +10,10 @@ class Settings:
|
||||||
self.connect()
|
self.connect()
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
self.settings.file_settings.library_path_input.returnPressed.connect(self.write_settings)
|
self.settings.visibilityChanged.connect(self.update_all)
|
||||||
|
self.settings.save_button.pressed.connect(self.write_settings)
|
||||||
|
|
||||||
def update_all(self):
|
def update_all(self, settings_visible: bool=True):
|
||||||
self.settings.file_settings.library_path_input.setText(self.app.settings.library_path)
|
self.settings.file_settings.library_path_input.setText(self.app.settings.library_path)
|
||||||
|
|
||||||
def update_settings(self, key, value):
|
def update_settings(self, key, value):
|
||||||
|
|
|
@ -27,8 +27,8 @@ class Settings(QDockWidget):
|
||||||
self.tabs.addTab(self.file_settings, "Files")
|
self.tabs.addTab(self.file_settings, "Files")
|
||||||
self.content_layout.addWidget(self.tabs)
|
self.content_layout.addWidget(self.tabs)
|
||||||
|
|
||||||
self.save_settings_button = QPushButton("&Save", self.content)
|
self.save_button = QPushButton("&Save", self.content)
|
||||||
self.content_layout.addWidget(self.save_settings_button)
|
self.content_layout.addWidget(self.save_button)
|
||||||
|
|
||||||
self.setWidget(self.content)
|
self.setWidget(self.content)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue