12345678910111213141516171819202122232425262728293031 |
- #include <QtGui/QApplication>
- #include "qmlapplicationviewer.h"
- #include "meewordsdata.h"
- #include <QTranslator>
- #include <QLocale>
- Q_DECL_EXPORT int main(int argc, char *argv[])
- {
- QScopedPointer<QApplication> app(createApplication(argc, argv));
- QTranslator trans;
- QLocale lcl;
- QmlApplicationViewer viewer;
- if(lcl.language() == QLocale::Russian) {
- trans.load( "/opt/MeeWords/qml/MeeWords/i18n/meewords_rus.qm" );
- app->installTranslator( &trans );
- }
- MeeWordsData myData;
- viewer.rootContext()->setContextProperty("cppMeeWords", &myData);
- viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
- viewer.setMainQmlFile(QLatin1String("qml/MeeWords/main.qml"));
- viewer.showExpanded();
- return app->exec();
- }
|