tools/map_templates_tool/main.cpp
author unC0Rr
Tue, 31 Dec 2024 15:18:18 +0100
branchtransitional_engine
changeset 16082 85d7d6b71087
parent 16072 adb44a2d8226
permissions -rw-r--r--
Add some more work on rust ai

#include <QGuiApplication>
#include <QQmlApplicationEngine>


int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QQmlApplicationEngine engine;
    const QUrl url(u"qrc:/map_templates_tool/main.qml"_qs);
    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();
}