Solved How to return QJsonObject from scripted call via engine evaluate?
-
I am calling a JavaScript function using QJSEngine, the JavaScript function returns a JSON object. How can I accept this from the evaluate call?
I want to assign it to an instance of QJsonObject.
-
@SPlatten The easiest way is to convert it to string (
objectName.toString()
) and parse the string withQJsonDocument::fromJson()
. -
@SPlatten The easiest way is to convert it to string (
objectName.toString()
) and parse the string withQJsonDocument::fromJson()
.