equal
deleted
inserted
replaced
|
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 } |