How can I access json data at c++ code in qml?
Unsolved
General and Desktop
-
hi, i'm student learning Qt, i made a simple app for data storage on AWS DB.
I made my own code querying DB and making c++ class with QJsonObject datas,
and now i want to access my class data in qml and print it on UI.
does QJsonObject type support direct access in qml?
if not, how can i access my json data/?
-
@taedooly said in How can I access json data at c++ code in qml?:
does QJsonObject type support direct access in qml?
QML converts the QVariantMap type to a JSON object.
So simply call QJsonObject::toVariantMap() and pass it to on