migel
7th June 2012, 11:09
Hi
A javascript function is called in webkit to my attached QT object, which I am able to catch it in c++ function. The point is that this js function passes Json Object. Qt / C++ sees is as "[object Object]" when I print it to the screen.
Is there a way to do anything with this json object like calling its functions etc ? I have tried many things using QScriptEngine etc, but I am afraid QT as this point sees it only as a plain string.
Thanks.
Added after 40 minutes:
Figured: A QVariant should be used then translated to QMap.
A javascript function is called in webkit to my attached QT object, which I am able to catch it in c++ function. The point is that this js function passes Json Object. Qt / C++ sees is as "[object Object]" when I print it to the screen.
Is there a way to do anything with this json object like calling its functions etc ? I have tried many things using QScriptEngine etc, but I am afraid QT as this point sees it only as a plain string.
Thanks.
Added after 40 minutes:
Figured: A QVariant should be used then translated to QMap.