main.cpp 845 B

123456789101112131415161718192021222324252627282930313233
  1. #include <QtGui/QApplication>
  2. #include "qmlapplicationviewer.h"
  3. #ifdef HAVE_GLWIDGET
  4. #include <QGLWidget>
  5. #endif
  6. int main(int argc, char *argv[])
  7. {
  8. #ifdef Q_OS_SYMBIAN
  9. QApplication::setGraphicsSystem(QLatin1String("openvg"));
  10. #elif defined(Q_WS_MAEMO_5)
  11. QApplication::setGraphicsSystem(QLatin1String("opengl"));
  12. //#else
  13. // QApplication::setGraphicsSystem(QLatin1String("raster"));
  14. #endif
  15. QApplication app(argc, argv);
  16. //app.setProperty("NoMStyle", true);
  17. QmlApplicationViewer viewer;
  18. #ifdef HAVE_GLWIDGET
  19. QGLWidget *glWidget = new QGLWidget(&viewer);
  20. viewer.setViewport(glWidget);
  21. #endif
  22. viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
  23. viewer.setMainQmlFile(QLatin1String("qml/MeeToDo/main.qml"));
  24. //viewer.showExpanded();
  25. viewer.showFullScreen();
  26. return app.exec();
  27. }