diff options
| -rw-r--r-- | src/private/qstyleitem.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/private/qstyleitem.cpp b/src/private/qstyleitem.cpp index 7de585aa3..913316f8f 100644 --- a/src/private/qstyleitem.cpp +++ b/src/private/qstyleitem.cpp @@ -132,7 +132,12 @@ QStyleItem::QStyleItem(QQuickItem *parent) m_contentHeight(0) { - if (!qApp->style()) { + // Check on QApplication, allowing for "qmlplugindump" to query our interfaces. + QCoreApplication *coreApp = QCoreApplication::instance(); + Q_ASSERT(coreApp); + if (!qobject_cast<QApplication *>(coreApp)) { + if (QCoreApplication::applicationFilePath().contains(QLatin1String("qmlplugindump"), Qt::CaseInsensitive)) + return; qWarning("\nError: No widget style available. \n\nQt Quick Controls" "currently depend on the widget module to function. \n" "Use QApplication when creating standalone executables.\n\n"); |
