summaryrefslogtreecommitdiff
path: root/examples/qtobject/main.cpp
blob: e9fbc65877a8ee4736c75a36bf3cc00682c2b813 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <QtGui/QGuiApplication>

#include <QtQml>

#include "qtquick2applicationviewer.h"
#include "testobject.h"

int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
    qmlRegisterType<TestObjectFactory>("Qt.labs", 1, 0, "TestObjectFactory");
    qmlRegisterType<TestObject>("Qt.labs", 1, 0, "TestObject");

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(app.applicationDirPath() + QStringLiteral("/qml/qtobject/main.qml"));
    viewer.showExpanded();

    return app.exec();
}