Created
April 10, 2023 20:20
-
-
Save aneury1/cde2c3b2c1b6e570dee1ac8483474426 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QGuiApplication app(argc, argv); | |
QQmlApplicationEngine engine; | |
const 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(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment