main.cpp 538 B

1234567891011121314151617181920
  1. #include <QtGui/QApplication>
  2. #include "qmlapplicationviewer.h"
  3. #include "download_data.h"
  4. #include <QtDeclarative/QDeclarativeItem>
  5. #include <QDeclarativeContext>
  6. Q_DECL_EXPORT int main(int argc, char *argv[])
  7. {
  8. QScopedPointer<QApplication> app(createApplication(argc, argv));
  9. QmlApplicationViewer viewer;
  10. Download_data m_downData;
  11. viewer.setMainQmlFile(QLatin1String("qml/Free/main.qml"));
  12. viewer.rootContext()->setContextProperty("m_downData", &m_downData);
  13. viewer.showExpanded();
  14. return app->exec();
  15. }