--- a/src/MainWindow.cpp Thu Feb 24 14:36:56 2022 +0100 +++ b/src/MainWindow.cpp Fri Feb 25 10:51:36 2022 +0100 @@ -20,6 +20,7 @@ #include "InventoryFermentables.h" #include "InventoryHops.h" #include "InventoryYeasts.h" +#include "InventoryMiscs.h" #include "Setup.h" #include "../ui/ui_MainWindow.h" #include "config.h" @@ -126,6 +127,24 @@ } +void MainWindow::fromInventoryMiscs() +{ + qDebug() << Q_FUNC_INFO; + delete InventoryMiscsWindow; + this->show(); +} + + +void MainWindow::on_actionMiscs_triggered() +{ + qDebug() << Q_FUNC_INFO; + InventoryMiscsWindow = new InventoryMiscs(this); + QObject::connect(InventoryMiscsWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryMiscs())); + this->hide(); // Close the main window + InventoryMiscsWindow->show(); // Show a second window +} + + void MainWindow::fromSetup() { qDebug() << Q_FUNC_INFO;