02-08-2013 01:27 PM
I'm trying to pass values back to the QML (from a C++ function), but I'm seriously having troubles figuring it out.
Is it only possible by using the signals or is there an other way?
And my second problem is getting/calling nested object instances to the QML.
I registered the objects at the main.cpp, so I can use them seperately, but I want like this:
- Three classes A, B and C have been defined. Class A had a QVector containing x B classes. B class has a C class as a child.
I want to call the getBClasses function from the A class and then call a function from the C class, like this:
The only way to I get this done now from my QML is calling them one by one and passing the values one by one.
Get class A object
Get class B object from A
Get class C object from B
Call function from C
Could someone give me some inspiration/advice on these two subjects? Looked around on the internet for a while, but didn't see any solutions for this.
Thanks in advanced