QmlDesigner: Introduce QMLDESIGNER_QUICK3D_MODE

We should enable the 3d edit mode only, if there is
QtQuick3D import. Additionally there should also be an option in the UI.

Change-Id: I2010f2cdd6546c63a2263b8ee02480d4f13177c2
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Thomas Hartmann
2019-10-14 15:38:00 +02:00
parent 41a7cd15be
commit db3dc34a12
4 changed files with 23 additions and 10 deletions
@@ -71,8 +71,9 @@ void Qt5NodeInstanceServer::initializeView()
DesignerSupport::createOpenGLContext(m_quickView.data());
if (QCoreApplication::arguments().at(2) == "editormode") {
/* In 'editormode' we do not use the DesignerWindowManager
if (qEnvironmentVariableIsSet("QMLDESIGNER_QUICK3D_MODE")
&& QCoreApplication::arguments().at(2) == "editormode") {
/* In '3d editormode' we do not use the DesignerWindowManager
* and since we do not show the QQuickView we have to manually create the OpenGL context */
auto context = new QOpenGLContext(m_quickView);
context->setFormat(surfaceFormat);