Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void MyApp::load(QQmlApplicationEngine &engine)
- {
- const QUrl url(QStringLiteral("qrc:/qml/myapp.qml"));
- connect(&engine, &QQmlApplicationEngine::objectCreated, this, [url](QObject *obj, const QUrl &objUrl)
- {
- if (!obj && url == objUrl)
- QCoreApplication::exit(-1);
- }, Qt::QueuedConnection);
- engine.load(url);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement