--- a/src/MainWindow.cpp Fri Feb 25 10:51:36 2022 +0100 +++ b/src/MainWindow.cpp Sat Feb 26 16:34:20 2022 +0100 @@ -21,6 +21,7 @@ #include "InventoryHops.h" #include "InventoryYeasts.h" #include "InventoryMiscs.h" +#include "InventoryWaters.h" #include "Setup.h" #include "../ui/ui_MainWindow.h" #include "config.h" @@ -145,6 +146,24 @@ } +void MainWindow::fromInventoryWaters() +{ + qDebug() << Q_FUNC_INFO; + delete InventoryWatersWindow; + this->show(); +} + + +void MainWindow::on_actionWaters_triggered() +{ + qDebug() << Q_FUNC_INFO; + InventoryWatersWindow = new InventoryWaters(this); + QObject::connect(InventoryWatersWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryWaters())); + this->hide(); // Close the main window + InventoryWatersWindow->show(); // Show a second window +} + + void MainWindow::fromSetup() { qDebug() << Q_FUNC_INFO;