proto-debuger/protoDebuger/main.cpp

22 lines
612 B
C++
Raw Normal View History

2021-04-04 18:32:21 +00:00
#include <QApplication>
2021-04-04 02:57:36 +00:00
#include <QQmlApplicationEngine>
2021-04-04 18:32:21 +00:00
#include "lua_wraper.h"
2021-04-04 02:57:36 +00:00
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
2021-04-04 18:32:21 +00:00
QApplication app(argc, argv);
2021-04-04 02:57:36 +00:00
2021-04-04 18:32:21 +00:00
// TestLua();
2021-04-04 02:57:36 +00:00
QQmlApplicationEngine engine;
const QUrl url(QStringLiteral("qrc:/main.qml"));
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();
}