@@ -175,7 +175,14 MainWindow::MainWindow(QWidget *parent) | |||||
175 | this->menuBar()->addAction(tr("File")); |
|
175 | this->menuBar()->addAction(tr("File")); | |
176 | auto toolsMenu = this->menuBar()->addMenu(tr("Tools")); |
|
176 | auto toolsMenu = this->menuBar()->addMenu(tr("Tools")); | |
177 | toolsMenu->addAction(tr("Settings..."), [this]() { |
|
177 | toolsMenu->addAction(tr("Settings..."), [this]() { | |
178 | impl->m_SettingsDialog->exec(); |
|
178 | // Loads settings | |
|
179 | impl->m_SettingsDialog->loadSettings(); | |||
|
180 | ||||
|
181 | // Open settings dialog and save settings if the dialog is accepted | |||
|
182 | if (impl->m_SettingsDialog->exec() == QDialog::Accepted) { | |||
|
183 | impl->m_SettingsDialog->saveSettings(); | |||
|
184 | } | |||
|
185 | ||||
179 | }); |
|
186 | }); | |
180 |
|
187 | |||
181 | auto mainToolBar = this->addToolBar(QStringLiteral("MainToolBar")); |
|
188 | auto mainToolBar = this->addToolBar(QStringLiteral("MainToolBar")); |
General Comments 0
You need to be logged in to leave comments.
Login now