QJsonValue javascript integration
-
Hi,
I want to make a QJsonValue available to javascript and qml ( QJsonValue can hold any type of Json value, including objects and arrays )
If I make a Q_INVOKABLE function returning a QJsonValue, will it work ? I'm a bit confused. I read the doc page on data convertion between C++ and QML, but there is nothing about QJsonValue ... -
Hi,
I want to make a QJsonValue available to javascript and qml ( QJsonValue can hold any type of Json value, including objects and arrays )
If I make a Q_INVOKABLE function returning a QJsonValue, will it work ? I'm a bit confused. I read the doc page on data convertion between C++ and QML, but there is nothing about QJsonValue ...hi
@Pylvain said in QJsonValue javascript integration:If I make a Q_INVOKABLE function returning a QJsonValue, will it work
You can test it.
It looks like it is returning the plain JSON string, so you can use JSON.parse() in QML/Js to construct a json object