aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels/qqmllistaccessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlmodels/qqmllistaccessor.cpp')
-rw-r--r--src/qmlmodels/qqmllistaccessor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qmlmodels/qqmllistaccessor.cpp b/src/qmlmodels/qqmllistaccessor.cpp
index 230f190834..381d5d34de 100644
--- a/src/qmlmodels/qqmllistaccessor.cpp
+++ b/src/qmlmodels/qqmllistaccessor.cpp
@@ -75,6 +75,7 @@ void QQmlListAccessor::setList(const QVariant &v)
d = d.value<QJSValue>().toVariant();
variantsType = d.metaType();
}
+
if (!d.isValid()) {
m_type = Invalid;
} else if (variantsType == QMetaType::fromType<QStringList>()) {
@@ -85,6 +86,9 @@ void QQmlListAccessor::setList(const QVariant &v)
m_type = VariantList;
} else if (variantsType == QMetaType::fromType<QList<QObject *>>()) {
m_type = ObjectList;
+ } else if (variantsType.flags() & QMetaType::IsQmlList) {
+ d = QVariant::fromValue(QQmlListReference(d));
+ m_type = ListProperty;
} else if (variantsType == QMetaType::fromType<QQmlListReference>()) {
m_type = ListProperty;
} else if (variantsType.flags() & QMetaType::PointerToQObject) {