Despite all my attempts, and reading over many forum posts, I'm still getting the infamous 'undefined reference to 'vtable for GameStructure'' error.

I've had this error before, and resolved it multiple times in the past, but this time I can't figure it out. Despite calling qmake, moc_GameStructure.cpp is not getting generated.

Here's my code:

Qt Code:
  1. #ifndef GAMESTRUCTURE_H
  2. #define GAMESTRUCTURE_H
  3.  
  4. #include <QObject>
  5.  
  6. class GameStructure : public QObject
  7. {
  8. Q_OBJECT
  9. public:
  10. explicit GameStructure(QObject *parent = 0);
  11.  
  12. signals:
  13.  
  14. public slots:
  15. void testSlot();
  16. };
  17.  
  18. #endif // GAMESTRUCTURE_H
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. #include "GameStructure.h"
  2.  
  3. GameStructure::GameStructure(QObject *parent) :
  4. QObject(parent)
  5. {
  6.  
  7. }
  8.  
  9.  
  10. void GameStructure::testSlot()
  11. {
  12.  
  13. }
To copy to clipboard, switch view to plain text mode 

qmake does not generate the moc file for GameStructure, even though it does for another class in the same project. I've 'Rebuilt All', and 'Clean All' three hundred and seventy one times and counting.

The exact error message is: "undefined reference to 'vtable for GameStructure'", which appears twice, followed by: "collect2: ld returned 1 exit status"

Am I missing some pure virtual function that QObject declares that I must define when inheritting QObject directly? I just care about the signal-and-slot features about QObject, none of the rest of it matters to me for this class.