diff options
Diffstat (limited to 'examples/quick/shared/shared.h')
-rw-r--r-- | examples/quick/shared/shared.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/quick/shared/shared.h b/examples/quick/shared/shared.h index 5cf1333c02..d2f7c98311 100644 --- a/examples/quick/shared/shared.h +++ b/examples/quick/shared/shared.h @@ -49,8 +49,14 @@ app.setOrganizationDomain("qt-project.org");\ app.setApplicationName(QFileInfo(app.applicationFilePath()).baseName());\ QQuickView view;\ + if (qgetenv("QT_QUICK_CORE_PROFILE").toInt()) {\ + QSurfaceFormat f = view.format();\ + f.setProfile(QSurfaceFormat::CoreProfile);\ + f.setVersion(4, 4);\ + view.setFormat(f);\ + }\ view.connect(view.engine(), SIGNAL(quit()), &app, SLOT(quit()));\ - view.engine()->setUrlInterceptor(new QQmlFileSelector(&view));\ + new QQmlFileSelector(view.engine(), &view);\ view.setSource(QUrl("qrc:///" #NAME ".qml")); \ view.setResizeMode(QQuickView::SizeRootObjectToView);\ if (QGuiApplication::platformName() == QLatin1String("qnx") || \ |