From 5956771cb9fc6468eaf002ebe8a7a3396807c2c1 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 23 May 2016 20:48:08 +0200 Subject: Add an API to set the scenegraph backend As an alternative to QT_QUICK_BACKEND and QMLSCENE_DEVICE. The need for this is twofold: it is requested by Creator since environment variables have potential issues with child processes inheriting them. Also, platforms like WinRT may have issues with environment variables - as such a concept may not necessarily exist. Change-Id: Ia66b78dc83fce5af0f36d4b34dc094582eb6e61d Reviewed-by: Robin Burchell --- src/quick/items/qquickwindow.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/quick/items/qquickwindow.h') diff --git a/src/quick/items/qquickwindow.h b/src/quick/items/qquickwindow.h index 977b4956b2..37be6d591c 100644 --- a/src/quick/items/qquickwindow.h +++ b/src/quick/items/qquickwindow.h @@ -41,6 +41,7 @@ #define QQUICKWINDOW_H #include +#include #include #include #include @@ -60,7 +61,6 @@ class QQmlIncubationController; class QInputMethodEvent; class QQuickCloseEvent; class QQuickRenderControl; -class QSGRendererInterface; class Q_QUICK_EXPORT QQuickWindow : public QWindow { @@ -156,6 +156,9 @@ public: QSGRendererInterface *rendererInterface() const; + static void setSceneGraphBackend(QSGRendererInterface::GraphicsAPI api); + static void setSceneGraphBackend(const QString &backend); + Q_SIGNALS: void frameSwapped(); Q_REVISION(2) void openglContextCreated(QOpenGLContext *context); -- cgit v1.2.3