forked from qt-creator/qt-creator
QmlDesigner: Use OpenGL 4.1 surface for puppet
Change-Id: I520adbb54fc264e738ca5eb630f5cc7bc80ee4bd Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#include "qt5nodeinstanceserver.h"
|
#include "qt5nodeinstanceserver.h"
|
||||||
|
|
||||||
|
#include <QSurfaceFormat>
|
||||||
|
|
||||||
#include <QQmlFileSelector>
|
#include <QQmlFileSelector>
|
||||||
|
|
||||||
#include <QQuickItem>
|
#include <QQuickItem>
|
||||||
@@ -58,6 +60,12 @@ void Qt5NodeInstanceServer::initializeView()
|
|||||||
Q_ASSERT(!quickView());
|
Q_ASSERT(!quickView());
|
||||||
|
|
||||||
m_quickView = new QQuickView;
|
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());
|
DesignerSupport::createOpenGLContext(m_quickView.data());
|
||||||
|
|
||||||
if (qEnvironmentVariableIsSet("QML_FILE_SELECTORS")) {
|
if (qEnvironmentVariableIsSet("QML_FILE_SELECTORS")) {
|
||||||
|
Reference in New Issue
Block a user