Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
DBoosalis last edited by
I want to create an array of object and pass them into Qt's Javascipt engine. I have no problem passing in an object itself, and have had no problem passing in an array of simple objects such as strings. But trying to pass an array of semi-simple objects has been elusive to me. Here is what I have
function.append("print(Person.name + ' age:' + Person.age);");
function.append("print(People.name);"); // how to print this out ?
QScriptValue sv = engine.newObject();
QScriptValue svA = engine.newArray(2);
searchFunction = engine.evaluate(function);@
I only get the first print out.
I am using Qt 5 with the script module by the way