Advertisement
Guest User

Untitled

a guest
Feb 7th, 2012
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #include <QtGui/QApplication>
  2. #include "qmlapplicationviewer.h"
  3. #include <QGLContext>
  4.  
  5. Q_DECL_EXPORT int main(int argc, char *argv[])
  6. {
  7. QScopedPointer<QApplication> app(createApplication(argc, argv));
  8. QScopedPointer<QmlApplicationViewer> viewer(QmlApplicationViewer::create());
  9.  
  10. viewer->setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
  11. viewer->setMainQmlFile(QLatin1String("qml/qtcontexttest/main.qml"));
  12. viewer->showExpanded();
  13.  
  14. QGLContext* context1 = new QGLContext(QGLFormat::defaultFormat());
  15. bool ok = context1->create();
  16. if (ok) qWarning("Context1 CREATED");
  17. else qWarning("Context 1 creation FAILED");
  18.  
  19.  
  20. return app->exec();
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement