author | unC0Rr |
Tue, 21 Jan 2025 22:14:28 +0100 | |
changeset 16089 | 3f73daa3f212 |
parent 16072 | adb44a2d8226 |
permissions | -rw-r--r-- |
16072 | 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 |
} |