qmlFrontend/main.cpp
author unc0rr
Thu, 02 Apr 2015 21:09:56 +0300
branchqmlfrontend
changeset 10886 99273b7afbff
parent 10436 084e046f6bd5
permissions -rw-r--r--
- Merge default - *cough* sorry, but also in this commit: move *.qml files into qrc, include qmlFrontend into cmake build, also exclude QTfrontend

#include <QtGui/QGuiApplication>
#include <QQmlEngine>

#include "qtquick2applicationviewer/qtquick2applicationviewer.h"
#include "hwengine.h"
#include "previewimageprovider.h"
#include "themeiconprovider.h"


int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    HWEngine::exposeToQML();

    Q_INIT_RESOURCE(qmlFrontend);

    QtQuick2ApplicationViewer viewer;

    viewer.engine()->addImageProvider(QLatin1String("preview"), new PreviewImageProvider());
    viewer.engine()->addImageProvider(QLatin1String("theme"), new ThemeIconProvider());

    viewer.setSource(QUrl("qrc:/qml/qmlFrontend/main.qml"));
    viewer.showExpanded();

    return app.exec();
}