mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 14:25:02 +00:00
23 lines
664 B
C++
23 lines
664 B
C++
#include <QCoreApplication>
|
|
#include <QGuiApplication>
|
|
#include <QObject>
|
|
#include <QStringLiteral>
|
|
#include <QQmlApplicationEngine>
|
|
#include <QUrl>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
QGuiApplication app(argc, argv);
|
|
QQmlApplicationEngine engine;
|
|
const QUrl url(QStringLiteral("qrc:/FrontPage.qml"));
|
|
|
|
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
|
|
&app, [url](QObject *obj, const QUrl &objUrl) {
|
|
if (!obj && objUrl == url) {
|
|
QCoreApplication::exit(-1);
|
|
}
|
|
});
|
|
|
|
engine.load(url);
|
|
return app.exec();
|
|
}
|