Hi,
it seems, that from Qt 5.5.1 to 5.6 (and ever since) we have a change in
the behaviour of QMetaProperty::write when QSharedPointer is involved.
In 5.5.1 it was possible to use
@
QVariant var;
var.setValue<QSharedPointer<BaseClass>>(value);
QMetaProperty::write(object, var)
@
to write an Object of type QSharedPointer<DerivedClass> to an attribute
of a QObject.
Now we need to explicitly use
@
QVariant var;
var.setValue<QSharedPointer<DerivedClass>>(value);
QMetaProperty::write(object, var)
@
Otherwise write() will return false and the value is not set.
With simple pointers, it still works.
Is this an intended behaviour? If it works for normal pointers, it
*should* work for shared pointers, too, I would think.
Best regards,
Sebastian
--
http://www.classintouch.de - Tablet-Software für Lehrer
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest