summaryrefslogtreecommitdiffstats
path: root/src/controls/Private/qquickcontrolsettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls/Private/qquickcontrolsettings.cpp')
-rw-r--r--src/controls/Private/qquickcontrolsettings.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/controls/Private/qquickcontrolsettings.cpp b/src/controls/Private/qquickcontrolsettings.cpp
index b7ebc2139..2f86a4a15 100644
--- a/src/controls/Private/qquickcontrolsettings.cpp
+++ b/src/controls/Private/qquickcontrolsettings.cpp
@@ -90,7 +90,9 @@ static QString styleImportPath(QQmlEngine *engine, const QString &styleName)
{
QString path = qgetenv("QT_QUICK_CONTROLS_STYLE");
QFileInfo info(path);
- if (info.isRelative()) {
+ if (fromResource(path)) {
+ path = info.path();
+ } else if (info.isRelative()) {
bool found = false;
foreach (const QString &import, engine->importPathList()) {
QDir dir(import + QLatin1String("/QtQuick/Controls/Styles"));