How can I access json data at c++ code in qml?
-
wrote on 1 Nov 2020, 17:20 last edited by taedooly 11 Jan 2020, 17:26
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/?
-
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
2/2