Hello,
again i have searched the forums and the internet, but didn't find a satisfying answer to my problem.
I'm programming a system in which the user is able to add own Objects, which are evaluated by a QScriptEngine.
An example code which could be created is this:
Qt Code:
my_parameter = new Object(); my_parameter.name = "My new Parameter"; my_parameter.value = "10"; my_parameter.unit = "km";To copy to clipboard, switch view to plain text mode
Now the problem: If the user has created several of this parameters I need to track them to read all relevant properties.
I intended to do this with QScriptValueIterator, in which i would iterate over all values and if they have a specially-named parameter which they all share i know this is one of the objects i want.
I was expecting custom objects to be properties of the QScriptEngines globalObject(), but it seems that is not the case.
Do you know a way to iterate over all properties which were created so i can sort out the ones which i need?
If you know a documentation where i can find the answer myself i'm perfectly happy, but the short QScriptEngine description was not of much help.
Bookmarks