Hi!

I want to make my Qt4.1 application scriptable, but am having trouble. My app has something like below: -
Qt Code:
  1. -
  2. Object A
  3. / \
  4. Object AA Object AB
  5. / \
  6. Object AAA Object AAB
To copy to clipboard, switch view to plain text mode 
i.e 'Object A' has two members 'Object AA' & 'Object AB' and 'Object AA' has two more members 'Object AAA' & 'Object AAB'.

I want all of the above objects accessible from script. For this QSA doc says:

By passing an object to the scripting engine (using QSInterpreter::addTransientObject() or QSProject::addObject()), this object and all its signals, slots, properties, and child objects are made available to scripts
Does it means the following code alone would expose all objects to script:-
Qt Code:
  1. //Constructor of object A
  2. setObjectName("ObjectA");
  3. //Initialise all objects
  4. .
  5. .
  6. .
  7. .
  8. qsProject = new QSProject(this);
  9. qsProject->addObject(this);
To copy to clipboard, switch view to plain text mode 

Upon execution (While setting any property of 'ObjectAA') my app says 'ObjectAA' is undefined. This applies to all objects except 'ObjectA'.
I have also tried adding all objects to the projects but result is same.

Am i missing something? Please guide me.

Thanks in advance