forked from qt-creator/qt-creator
QmlPuppet: Force QApplication use in puppet if charts is imported
Qt Charts requires QApplication, so force that on when QtCharts import is detected. Change-Id: Ie725cb0714f2816a34374e46de71b82f00ce6239 Fixes: QDS-2842 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -149,7 +149,9 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
//If a style different from Desktop is set we have to use QGuiApplication
|
||||
bool useGuiApplication = qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_STYLE")
|
||||
bool useGuiApplication = (!qEnvironmentVariableIsSet("QMLDESIGNER_FORCE_QAPPLICATION")
|
||||
|| qgetenv("QMLDESIGNER_FORCE_QAPPLICATION") != "true")
|
||||
&& qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_STYLE")
|
||||
&& qgetenv("QT_QUICK_CONTROLS_STYLE") != "Desktop";
|
||||
|
||||
if (useGuiApplication) {
|
||||
|
||||
Reference in New Issue
Block a user