QmlDesigner: Use OpenGL 4.1 surface for puppet

Change-Id: I520adbb54fc264e738ca5eb630f5cc7bc80ee4bd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2019-06-11 14:54:00 +02:00
parent 798879c797
commit 2831f601fa

View File

@@ -25,6 +25,8 @@
#include "qt5nodeinstanceserver.h"
#include <QSurfaceFormat>
#include <QQmlFileSelector>
#include <QQuickItem>
@@ -58,6 +60,12 @@ void Qt5NodeInstanceServer::initializeView()
Q_ASSERT(!quickView());
m_quickView = new QQuickView;
QSurfaceFormat surfaceFormat = m_quickView->requestedFormat();
surfaceFormat.setVersion(4, 1);
surfaceFormat.setProfile(QSurfaceFormat::CoreProfile);
m_quickView->setFormat(surfaceFormat);
DesignerSupport::createOpenGLContext(m_quickView.data());
if (qEnvironmentVariableIsSet("QML_FILE_SELECTORS")) {