diff options
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 7b62de1..e60a5f2 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -70,6 +70,10 @@ #include "qmessagebox.h" #include <QtGui/qgraphicsproxywidget.h> +#ifdef QT_GRAPHICSSYSTEM_RUNTIME +#include "private/qgraphicssystem_runtime_p.h" +#endif + #include "qinputcontext.h" #include "qkeymapper_p.h" @@ -1565,7 +1569,14 @@ QStyle* QApplication::setStyle(const QString& style) void QApplication::setGraphicsSystem(const QString &system) { - QApplicationPrivate::graphics_system_name = system; +#ifdef QT_GRAPHICSSYSTEM_RUNTIME + if (QApplicationPrivate::graphics_system_name == QLatin1String("runtime")) { + QRuntimeGraphicsSystem *r = + static_cast<QRuntimeGraphicsSystem *>(QApplicationPrivate::graphics_system); + r->setGraphicsSystem(system); + } else +#endif + QApplicationPrivate::graphics_system_name = system; } /*! |