Sat, 19 Mar 2022 22:59:11 +0100
Finally found out how to make these databases work on a single main window. And it's dynamic too.
#ifndef _DATABASE_H #define _DATABASE_H #include <QSqlDatabase> #include <QDebug> #include <QSettings> class DataBase : public QObject { Q_OBJECT public: explicit DataBase(QObject *parent = 0); ~DataBase(); bool openDataBase(bool develop); void closeDataBase(); private: QSqlDatabase db; }; static DataBase *db; #endif