diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/api/studio3dqml/q3dsstudio3d.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/studio3dqml/q3dsstudio3d.cpp b/src/api/studio3dqml/q3dsstudio3d.cpp index 5a46089..2cf8ed2 100644 --- a/src/api/studio3dqml/q3dsstudio3d.cpp +++ b/src/api/studio3dqml/q3dsstudio3d.cpp @@ -40,6 +40,7 @@ #include <QtCore/qdebug.h> #include <QtCore/qfileinfo.h> #include <QtQuick/qquickwindow.h> +#include <QtQml/qqmlcontext.h> QT_BEGIN_NAMESPACE @@ -271,7 +272,8 @@ void Q3DSStudio3D::componentComplete() m_presentation->d_ptr->setCommandQueue(&m_pendingCommands); // Ensure qml stream proxy gets created on main thread - m_presentation->d_ptr->streamProxy(); + QQmlContext *ctx = QQmlEngine::contextForObject(this); + m_presentation->d_ptr->streamProxy()->setEngine(ctx->engine()); QQuickFramebufferObject::componentComplete(); } |