bubblekid.cpp 822 B

123456789101112131415161718192021222324252627
  1. #include <QtCore/QFileInfo>
  2. #include <QtCore/QSettings>
  3. #include <QtGui/QApplication>
  4. #include <QtDeclarative/QDeclarativeView>
  5. #include <QtDeclarative/QDeclarativeEngine>
  6. #include <QtDeclarative/QDeclarativeNetworkAccessManagerFactory>
  7. #include <QtDeclarative/QDeclarativeEngine>
  8. // QML in a Qt application
  9. // http://doc.qt.nokia.com/4.7/qtbinding.html
  10. int main(int argc, char *argv[])
  11. {
  12. QApplication application(argc, argv);
  13. QDeclarativeView view;
  14. view.setSource(QUrl("qrc:/bubblekid.qml"));
  15. view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
  16. QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit()));
  17. #if defined(Q_OS_SYMBIAN)
  18. view.showFullScreen();
  19. #else
  20. view.setGeometry(QRect(100, 100, 640, 360));
  21. view.show();
  22. #endif
  23. return application.exec();
  24. }