View Full Version : QSA and inheritance

8th June 2006, 16:33
I'm using the last version of QSA within my software and I have the following problem.

I add using QSProject.addObject() an object, say o of type O, which features the following function :

void O::f(A a) {...}

and I have other objects of type B which inherits A

class B : public A ;

for which I have reimplemented the create function so that I can create them in the script interface.

So in the script I write something like :

var b = new B ;
o.f(b) ;

And I get the following error message : Error : No matching slot found, available overloads are : O::addObject(A*)

Maybe inheritance is not handled in QSA ? Thanks for your responses.

13th June 2006, 15:05
So the problem is pretty simple, it seems that automatic casts are not handeld in QSA. I digged a little more into QSA Language Reference but I didn't found any reference to automatic cast, polymorphism or things like that.

Maybe it should work but I didn't registred the class the good way ?