I inherited a class from QObject :
class Parent: public QObject { Q_OBJECT QObject* cl; public: Parent(QObject *parent=0):QObject(parent) {
I solved my problem by adding this to my header file :
#ifndef MYCLASSNAME_H #define MYCLASSNAME_H ... // all the header file content. #endif