qmlfrontend/main.cpp
author unc0rr
Mon, 25 Dec 2017 00:58:47 +0100
branchqmlfrontend
changeset 12865 e33bcb9d5e9c
parent 12862 90f927b4b9e1
permissions -rw-r--r--
Preview rendering seems to work now
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     1
#include <QGuiApplication>
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     2
#include <QQmlApplicationEngine>
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     3
12862
90f927b4b9e1 Start hacking new frontend
unc0rr
parents: 12859
diff changeset
     4
#include "hwengine.h"
90f927b4b9e1 Start hacking new frontend
unc0rr
parents: 12859
diff changeset
     5
12865
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12862
diff changeset
     6
int main(int argc, char* argv[])
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     7
{
12865
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12862
diff changeset
     8
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12862
diff changeset
     9
    QGuiApplication app(argc, argv);
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12862
diff changeset
    10
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12862
diff changeset
    11
    QQmlApplicationEngine engine;
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    12
12865
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12862
diff changeset
    13
    HWEngine::exposeToQML();
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    14
12865
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12862
diff changeset
    15
    engine.load(QUrl(QLatin1String("qrc:/main.qml")));
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12862
diff changeset
    16
    if (engine.rootObjects().isEmpty())
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12862
diff changeset
    17
        return -1;
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12862
diff changeset
    18
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12862
diff changeset
    19
    return app.exec();
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    20
}