#include #include #include "connection.h" #include "room.h" #include "user.h" #include "jobs/syncjob.h" #include "settings.h" using namespace QMatrixClient; // https://forum.qt.io/topic/57809 Q_DECLARE_METATYPE(SyncJob*) Q_DECLARE_METATYPE(Room*) int main(int argc, char *argv[]) { #if defined(Q_OS_WIN) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif QGuiApplication app(argc, argv); qmlRegisterType(); qRegisterMetaType ("SyncJob*"); qmlRegisterType(); qRegisterMetaType("Room*"); qmlRegisterType(); qRegisterMetaType("User*"); qmlRegisterType("Matrique", 0, 1, "Connection"); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml"))); if (engine.rootObjects().isEmpty()) return -1; return app.exec(); }