--- a/src/MainWindow.cpp Sun Mar 06 12:00:07 2022 +0100 +++ b/src/MainWindow.cpp Sun Mar 06 15:31:40 2022 +0100 @@ -23,6 +23,7 @@ #include "InventoryMiscs.h" #include "InventoryWaters.h" #include "InventoryEquipments.h" +#include "ProfileWaters.h" #include "Setup.h" #include "../ui/ui_MainWindow.h" #include "config.h" @@ -183,6 +184,24 @@ } +void MainWindow::fromProfileWaters() +{ + qDebug() << Q_FUNC_INFO; + delete ProfileWatersWindow; + this->show(); +} + + +void MainWindow::on_actionWater_profiles_triggered() +{ + qDebug() << Q_FUNC_INFO; + ProfileWatersWindow = new ProfileWaters(this); + QObject::connect(ProfileWatersWindow, SIGNAL(firstWindow()), this, SLOT(fromProfileWaters())); + this->hide(); // Close the main window + ProfileWatersWindow->show(); // Show a second window +} + + void MainWindow::fromSetup() { qDebug() << Q_FUNC_INFO;