author | unC0Rr |
Tue, 17 Dec 2024 15:44:21 +0100 | |
branch | transitional_engine |
changeset 16049 | db18f1a30b0c |
parent 16043 | adb44a2d8226 |
permissions | -rw-r--r-- |
16043 | 1 |
#include <QGuiApplication> |
2 |
#include <QQmlApplicationEngine> |
|
3 |
||
4 |
||
5 |
int main(int argc, char *argv[]) |
|
6 |
{ |
|
7 |
QGuiApplication app(argc, argv); |
|
8 |
||
9 |
QQmlApplicationEngine engine; |
|
10 |
const QUrl url(u"qrc:/map_templates_tool/main.qml"_qs); |
|
11 |
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, |
|
12 |
&app, [url](QObject *obj, const QUrl &objUrl) { |
|
13 |
if (!obj && url == objUrl) |
|
14 |
QCoreApplication::exit(-1); |
|
15 |
}, Qt::QueuedConnection); |
|
16 |
engine.load(url); |
|
17 |
||
18 |
return app.exec(); |
|
19 |
} |