Commit 6c8a1612 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.instances: support QVariant properties as parent property

QVariants can store QObjects. The model property of ListView is
a QVariant for example.
parent c53f8a86
......@@ -277,7 +277,9 @@ static bool isList(const QDeclarativeProperty &property)
static bool isObject(const QDeclarativeProperty &property)
{
return property.propertyTypeCategory() == QDeclarativeProperty::Object;
return (property.propertyTypeCategory() == QDeclarativeProperty::Object) ||
//QVariant can also store QObjects. Lets trust our model.
(QLatin1String(property.propertyTypeName()) == QLatin1String("QVariant"));
}
static QVariant objectToVariant(QObject *object)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment