mirror of
https://github.com/stemoretti/BaseUI.git
synced 2025-05-25 15:20:23 -04:00
24 lines
545 B
C++
24 lines
545 B
C++
#include <QGuiApplication>
|
|
#include <QQmlApplicationEngine>
|
|
|
|
#include <BaseUI/core.h>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QGuiApplication app(argc, argv);
|
|
|
|
QQmlApplicationEngine engine;
|
|
|
|
BaseUI::init(&engine);
|
|
|
|
QUrl url("qrc:/main.qml");
|
|
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();
|
|
}
|