main.cpp 562 Bytes
Newer Older
1
2
3
#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"

4
Q_DECL_EXPORT int main(int argc, char *argv[])
5
{
6
7
    QScopedPointer<QApplication> app(createApplication(argc, argv));
    QScopedPointer<QmlApplicationViewer> viewer(QmlApplicationViewer::create());
8

9
10
    viewer->addImportPath(QLatin1String("modules")); // ADDIMPORTPATH
    viewer->setOrientation(QmlApplicationViewer::ScreenOrientationAuto); // ORIENTATION
11
    viewer->setMainQmlFile(QLatin1String("qml/app/qtquick10/main.qml")); // MAINQML
12
    viewer->showExpanded();
13

14
    return app->exec();
15
}