Я унаследовал класс от QObject:
class Parent: public QObject
{
    Q_OBJECT
    QObject* cl;
public:
    Parent(QObject *parent=0):QObject(parent) {
        cl = NULL;
    }
    QObject* getCl() const {
        return cl;
    }
    void setCl(QObject *obj) {
        cl = obj;
    }
};
Но когда я пишу:
Parent ev;
Я получаю следующую ошибку:
main.obj:-1: error: LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall Parent::metaObject(void)const " ([email protected]@@[email protected]@XZ)
main.obj:-1: error: LNK2001: unresolved external symbol "public: virtual void * __thiscall Parent::qt_metacast(char const *)" ([email protected]@@[email protected])
main.obj:-1: error: LNK2001: unresolved external symbol "public: virtual int __thiscall Parent::qt_metacall(enum QMetaObject::Call,int,void * *)" ([email protected]@@[email protected]@@[email protected])