PDA

View Full Version : Problem with QObject subclass



anoraxis
14th February 2012, 17:43
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?

mvuori
14th February 2012, 18:06
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.