Files
qt-creator/share/qtcreator/templates/qmlapp/main.cpp
Kai Koehne 424fcf8c04 QmlApp template: Use new 4.7.1 API to enable qml debugging
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.
2010-11-08 09:43:49 +01:00

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();
}