diff -r 8a304c898a75 -r c58b82549713 src/MainWindow.cpp --- a/src/MainWindow.cpp Wed Feb 16 16:29:42 2022 +0100 +++ b/src/MainWindow.cpp Wed Feb 16 22:11:29 2022 +0100 @@ -17,6 +17,7 @@ #include "MainWindow.h" #include "AboutDialog.h" #include "InventorySuppliers.h" +#include "Setup.h" #include "../ui/ui_MainWindow.h" #include "config.h" @@ -68,6 +69,24 @@ } +void MainWindow::fromSetup() +{ + qDebug() << Q_FUNC_INFO; + delete SetupWindow; + this->show(); +} + + +void MainWindow::on_actionSetup_triggered() +{ + qDebug() << Q_FUNC_INFO; + SetupWindow = new Setup(this); + QObject::connect(SetupWindow, SIGNAL(firstWindow()), this, SLOT(fromSetup())); + this->hide(); // Close the main window + SetupWindow->show(); // Show a second window +} + + void MainWindow::on_actionAbout_triggered() { qDebug() << Q_FUNC_INFO;