Files
qt-creator/src/plugins/qmlprojectmanager/wizards/templates/cpp/main.cpp
Alessandro Portale 59386b205c Wizard for standalone qml applications
Short: Create a new self running qml .sis/.deb package.

Long:
A typical Qml application usually consists of a couple of .qml,
.js and image files. Deploying such an application is challenging,
especially to mobile devices.

This wizard will generate a C++ project with a customized, light
weight Declarative Viewer, a helloworld Qml file and a .pro file
that takes care of the deployment of the Qml file(s).

This is just the first step. There will be an import wizard,
and further more there will be the possibility to add additional
Qml modules and probably also Qml directories to the package.

Task-number: QTCREATORBUG-1813
2010-07-16 12:17:23 +02:00

22 lines
592 B
C++

#include <QtGui/QApplication>
#include "qmlapplicationview.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QmlApplicationView qmlApp(QLatin1String("app.qml")); // MAINQML
QStringList importPaths; // IMPORTPATHSLIST
qmlApp.setImportPathList(importPaths); // SETIMPORTPATHLIST
qmlApp.setOrientation(QmlApplicationView::Auto); // ORIENTATION
qmlApp.setLoadDummyData(false); // LOADDUMMYDATA
#ifdef Q_OS_SYMBIAN
qmlApp.showFullScreen();
#else
qmlApp.setGeometry(QRect(100, 100, 360, 640));
qmlApp.show();
#endif
return app.exec();
}