Results 1 to 3 of 3

Thread: Invoke method inherited from interface

  1. #1
    Join Date
    Dec 2009
    Posts
    65
    Thanks
    10
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Invoke method inherited from interface

    I created interface with single function and added Q_INVOKABLE before that function
    When i use the object that implements this interface, take its metaObject(), and iterate on metaObject().method(i) there is no methodSignature() that matches the one that is inherited from the interface.
    Am i doing it wrong or Is this possible at all?

  2. #2
    Join Date
    Feb 2012
    Location
    Warsaw, Poland
    Posts
    37
    Thanks
    3
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Invoke method inherited from interface

    Use Q_INVOKABLE in derived class also.

    Edit: or make this function virtual.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Invoke method inherited from interface

    Quote Originally Posted by davidovv View Post
    I created interface with single function and added Q_INVOKABLE before that function
    When i use the object that implements this interface, take its metaObject(), and iterate on metaObject().method(i) there is no methodSignature() that matches the one that is inherited from the interface.
    Am i doing it wrong or Is this possible at all?
    Show the code please.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 2
    Last Post: 8th March 2014, 18:38
  2. ActiveX-javascript invoke activex interface exception
    By zhy282289 in forum Qt Programming
    Replies: 0
    Last Post: 29th October 2012, 02:58
  3. Replies: 1
    Last Post: 12th August 2012, 17:37
  4. problem with interface Class - Error:undefined interface
    By k.qasempour in forum Qt Programming
    Replies: 4
    Last Post: 12th August 2012, 02:11
  5. QThread::start() doesn't invoke run() method
    By seim in forum Qt Programming
    Replies: 2
    Last Post: 5th February 2009, 17:09

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.