2024-12-14 00:19:20 +00:00
|
|
|
#include <QGuiApplication>
|
|
|
|
#include <QQmlApplicationEngine>
|
2024-12-24 02:46:20 +00:00
|
|
|
#include "database.h"
|
2024-12-14 00:19:20 +00:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
QCoreApplication::setApplicationName("Camper");
|
|
|
|
QCoreApplication::setOrganizationName("Tandem");
|
|
|
|
|
|
|
|
QGuiApplication app(argc, argv);
|
|
|
|
|
2024-12-24 02:46:20 +00:00
|
|
|
Database::getInstance(); // return ignored; create instance before QML engine
|
2024-12-14 00:19:20 +00:00
|
|
|
QQmlApplicationEngine engine;
|
|
|
|
QObject::connect(
|
|
|
|
&engine,
|
|
|
|
&QQmlApplicationEngine::objectCreationFailed,
|
|
|
|
&app,
|
|
|
|
[]() { QCoreApplication::exit(-1); },
|
|
|
|
Qt::QueuedConnection);
|
|
|
|
engine.loadFromModule("Camper", "Main");
|
|
|
|
|
|
|
|
return app.exec();
|
|
|
|
}
|