summaryrefslogtreecommitdiffstats
path: root/QtDemo/main.cpp
blob: f63986e2520e91c2f0b82ac13aaab05dfa87622f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <QtGui/QGuiApplication>
#include "qtquick2applicationviewer.h"
#include <QQmlContext>
#include "shaderfilereader.h"

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

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

    ShaderFileReader fileReader;
    viewer.rootContext()->setContextProperty("shaderFileReader", &fileReader);

    return app.exec();
}