I had same issue when i decided to add Q_OBJECT
into my header file.
First try run qmake
manually.
If not resolved, so delete build folder and build project again
If building all of the project is a heavy task, so try following steps:
- Add a new temp class with QObject as its base class
- Double check your header and source file for any mistake using new temp class
- Build your project. It should built successfully
- Remove your temp class completely (.h and .cpp file and relative lines on .pro file)
Good luck :)