main.cpp 619 B

1234567891011121314151617181920212223242526272829
  1. #include <QApplication>
  2. #include "vgwidget.h"
  3. int main(int argc, char *argv[])
  4. {
  5. #ifdef Q_OS_SYMBIAN
  6. QApplication::setGraphicsSystem("openvg");
  7. #endif
  8. /*
  9. #error This program requires OpenVG graphics, which is currently only supported on Q_OS_SYMBIAN target
  10. #endif
  11. */
  12. QApplication app(argc, argv);
  13. VGWidget w;
  14. w.setAttribute( Qt::WA_AcceptTouchEvents );
  15. #ifdef FORCE_LANDSCAPE
  16. w.setAttribute(Qt::WA_LockLandscapeOrientation);
  17. #endif
  18. #ifdef FORCE_PORTRAIT
  19. w.setAttribute(Qt::WA_LockPortraitOrientation);
  20. #endif
  21. w.showFullScreen();
  22. return app.exec();
  23. }