Alisa/native/main.cpp

23 lines
588 B
C++
Raw Normal View History

2024-07-08 20:07:09 +02:00
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QIcon>
2024-07-05 12:33:15 +02:00
2024-07-08 20:07:09 +02:00
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
2024-07-09 12:21:48 +02:00
app.setWindowIcon(QIcon(":/Alisa/Assets/Icons/turbo.svg"));
2024-07-08 20:07:09 +02:00
QQmlApplicationEngine engine;
2024-07-09 11:39:55 +02:00
const QUrl url(u"qrc:/Alisa/Main.qml"_qs);
2024-07-08 20:07:09 +02:00
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
&app, [url](QObject *obj, const QUrl &objUrl) {
if (!obj && url == objUrl)
QCoreApplication::exit(-1);
}, Qt::QueuedConnection);
engine.load(url);
return app.exec();
2024-07-05 12:33:15 +02:00
}