Results 1 to 2 of 2

Thread: QSA and inheritance

  1. #1
    Join Date
    Apr 2006
    Posts
    29
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Question QSA and inheritance

    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 :

    Qt Code:
    1. void O::f(A a) {...}
    To copy to clipboard, switch view to plain text mode 

    and I have other objects of type B which inherits A

    Qt Code:
    1. class B : public A ;
    To copy to clipboard, switch view to plain text mode 

    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 :

    Qt Code:
    1. var b = new B ;
    2. o.f(b) ;
    To copy to clipboard, switch view to plain text mode 

    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.
    Last edited by jwintz; 8th June 2006 at 17:17. Reason: fixed a mistake in the explanation ...

  2. #2
    Join Date
    Apr 2006
    Posts
    29
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default No one is experienced with QSA

    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 ?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.