main.cpp 805 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. ============================================================================
  3. Name : P2Pexample.cpp
  4. Author :
  5. Copyright : Your copyright notice
  6. Description : Main GUI Application
  7. ============================================================================
  8. */
  9. #include <QtGui/QApplication>
  10. #include <QtDeclarative>
  11. #include "main.h"
  12. #include "qmlapplicationviewer.h"
  13. #include "p2pengine.h"
  14. //! The main function.
  15. int main(int argc, char *argv[])
  16. {
  17. QApplication app(argc, argv);
  18. qmlRegisterType<P2PEngine>("P2PEngine", 1, 0, "P2PEngine");
  19. QmlApplicationViewer viewer;
  20. viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait);
  21. viewer.setMainQmlFile(QLatin1String("qml/P2Pexample/main.qml"));
  22. viewer.showFullScreen();
  23. return app.exec();
  24. }