forked from qt-creator/qt-creator
Qml debugging is now disabled by default, and has to be enabled explicitly (b2016bbfc9). This has to be done before the QDView/QDEngine is instantiated ... The patch introduces a static create method to QmlApplicationViewer, so that the setup can be hidden from the users main file.
17 lines
481 B
C++
17 lines
481 B
C++
#include <QtGui/QApplication>
|
|
#include "qmlapplicationviewer.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication app(argc, argv);
|
|
|
|
QmlApplicationViewer *viewer = QmlApplicationViewer::create();
|
|
|
|
viewer->addImportPath(QLatin1String("modules")); // ADDIMPORTPATH
|
|
viewer->setOrientation(QmlApplicationViewer::ScreenOrientationAuto); // ORIENTATION
|
|
viewer->setMainQmlFile(QLatin1String("qml/app/main.qml")); // MAINQML
|
|
viewer->show();
|
|
|
|
return app.exec();
|
|
}
|