Have you defined th Q_OBJECT macro in your header file.