blob: d76c955937e1a6faf308f8afb134f9ce2637e7f2 [file] [log] [blame]
#include "IdeMain.h"
#include <QQmlApplicationEngine>
#include <QQuickStyle>
#include "CellModel.h"
int ideMain(QGuiApplication *app)
{
QQmlApplicationEngine engine;
// This is done implicitly now.
// registerTypes(&engine);
QQuickStyle::setStyle("Material");
qRegisterMetaType<CellModel>();
qRegisterMetaType<CellModel *>();
const QUrl url(QStringLiteral("qrc:/qml/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();
}