[Interest] Direct modification of QJsonObject property from QML

BOUCARD Olivier boucard_olivier at yahoo.fr
Sat Jun 14 18:41:44 CEST 2014


Hi guys,

I have a QObject with a property declared like this Q_PROPERTY(QJsonObject data READ data WRITE setData).
This is very convenient when reading for example: myObject.data.isSelected.
But when writing it does not work as expected, example myObject.data.isSelected = false, does not actually change the value in C++ object.

Do someone know how it is possible to modify the content of my C++ QJsonObject in QML without doing myObject.data = {isSelected: false}?

Thanks

Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140614/de111362/attachment.html>


More information about the Interest mailing list