The script itself is updating the ui, similar to the Calculator example.But why do you want to "reference" the UI from the script? Something runs the script, right? So it can retrieve the result from the script and display it on the UI.
My understanding of scripting is limited, so you are saying I can create an object inside the script pass it back to my c++ as a QScriptValue and then pass that back to the other script as an argument?Wrong, you can use objects.
If that is true that would be exactly what I needed, will just need to figure out the creation syntax for an object inside a script and setting its variables and returning it.
Bob
Edit:
Looks like I could do something like
That should return the myObject as a QScriptValue that I can pass as an argument to the other script?Qt Code:
function foo() { myObject = new Object(); myObject.a = 1; myObject.b = 2; return myObject; }To copy to clipboard, switch view to plain text mode
Bookmarks