I could not find the sample code about passing qmap to javascript in qt.
what I did ?
I have connected a QObject to the javascript, and could able to emit the signal from qt app, which is captured by javascript.
emit mydata(mapVariable);
In JavaScript: in the alert I am trying to print like:
function myslot(mapVar) {
alert (" map variable " + mapVar);
}
Problem:
It is not printing anything. That shows fundamentally I am making a big blunder here. Kindly suggest me how to resolve this issue?..
Well,
I found the solution, The QVariantMap is the data structure which can be passed to the java script, and can be treated as a JSON in the java script side.