Results 1 to 2 of 2

Thread: Problem with QObject subclass

  1. #1
    Join Date
    Nov 2010
    Location
    Cienfuegos, Cuba
    Posts
    16
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Problem with QObject subclass

    I wrote a QObject subclass because I need use the property system. The class worked fine, then I wrote other code (UI code) when I try to compile this I get two errors, one in each constructor of the class: vtable not found for <classname>. Reversing the changes the problem dosn't fix. Any suggestion?

  2. #2
    Join Date
    May 2011
    Posts
    239
    Thanks
    4
    Thanked 35 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default Re: Problem with QObject subclass

    This must be the most classic problem in Qt. As reversing the changes doesn't fix it, clearly part of the problem is in the build system. Do a clean for the project and a rebuild and then try again and see where you get the problems. With a little googling you will get other ideas. If I remember correctly, sometimes the problem has been caused by multiple inclusion of a file in the project or/and multiple inclusion of a header file. You might want to look carefully at your build process log and not just the main resulting "issues". The last time I had this problems the hint was an unnecessary recompiling of a file, which made me look into the .pro file for duplicate entries for source files and any duplicate headers issues.

  3. The following user says thank you to mvuori for this useful post:

    anoraxis (12th March 2012)

Similar Threads

  1. Subclass Problem
    By rleojoseph in forum Newbie
    Replies: 21
    Last Post: 4th February 2011, 06:43
  2. Replies: 1
    Last Post: 25th October 2010, 13:07
  3. QObject subclass in a QList
    By plan_rich in forum Newbie
    Replies: 3
    Last Post: 21st September 2010, 15:51
  4. Problem emiting signal in QTreeWidgetItem's subclass
    By Shawn in forum Qt Programming
    Replies: 12
    Last Post: 4th September 2007, 12:08
  5. problem of subclass QTableItem
    By hesummar in forum Qt Programming
    Replies: 1
    Last Post: 4th November 2006, 09:41

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.