I want to export a QVariantMap
property to QML, so I'm doing
Q_PROPERTY(QVariantMap myData READ myData)
and in myData() function I just do
QVariantMap map;
map.insert("ExampleKey", "key");
return map;
and in QML either
myData.ExampleKey //undefined
or
myData["ExampleKey"] //undefined
Could someone point me in the right direction to be able to use this as a simple JS object?