qmlfrontend/main.cpp
branchqmlfrontend
changeset 12860 e33bcb9d5e9c
parent 12857 90f927b4b9e1
equal deleted inserted replaced
12859:a03f245243b0 12860:e33bcb9d5e9c
     1 #include <QGuiApplication>
     1 #include <QGuiApplication>
     2 #include <QQmlApplicationEngine>
     2 #include <QQmlApplicationEngine>
     3 
     3 
     4 #include "hwengine.h"
     4 #include "hwengine.h"
     5 
     5 
     6 int main(int argc, char *argv[])
     6 int main(int argc, char* argv[])
     7 {
     7 {
     8   QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
     8     QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
     9   QGuiApplication app(argc, argv);
     9     QGuiApplication app(argc, argv);
    10 
    10 
    11   QQmlApplicationEngine engine;
    11     QQmlApplicationEngine engine;
    12   engine.load(QUrl(QLatin1String("qrc:/main.qml")));
       
    13   if (engine.rootObjects().isEmpty())
       
    14     return -1;
       
    15 
    12 
    16   return app.exec();
    13     HWEngine::exposeToQML();
       
    14 
       
    15     engine.load(QUrl(QLatin1String("qrc:/main.qml")));
       
    16     if (engine.rootObjects().isEmpty())
       
    17         return -1;
       
    18 
       
    19     return app.exec();
    17 }
    20 }