Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QtGui/QApplication>
- #include "qmlapplicationviewer.h"
- #include <QGLContext>
- Q_DECL_EXPORT int main(int argc, char *argv[])
- {
- QScopedPointer<QApplication> app(createApplication(argc, argv));
- QScopedPointer<QmlApplicationViewer> viewer(QmlApplicationViewer::create());
- viewer->setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
- viewer->setMainQmlFile(QLatin1String("qml/qtcontexttest/main.qml"));
- viewer->showExpanded();
- QGLContext* context1 = new QGLContext(QGLFormat::defaultFormat());
- bool ok = context1->create();
- if (ok) qWarning("Context1 CREATED");
- else qWarning("Context 1 creation FAILED");
- return app->exec();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement