summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/controls/Private/qquickcontrolsettings.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/controls/Private/qquickcontrolsettings.cpp b/src/controls/Private/qquickcontrolsettings.cpp
index 1965738a..a2fb824c 100644
--- a/src/controls/Private/qquickcontrolsettings.cpp
+++ b/src/controls/Private/qquickcontrolsettings.cpp
@@ -339,6 +339,11 @@ void QQuickControlSettings1::setStyleName(const QString &name)
QString oldName = m_name;
m_name = name;
+ if (!m_styleMap.contains(name)) {
+ // Maybe this style is not next to the default style, but elsewhere in the import path
+ findStyle(m_engine, name);
+ }
+
// Don't change the style if it can't be resolved.
if (!resolveCurrentStylePath())
m_name = oldName;