Unresolved external symbol "public: virtual struct QMetaObject const * __thiscall Parent

后端 未结 23 2308
醉话见心
醉话见心 2020-11-30 21:33

I inherited a class from QObject :

class Parent: public QObject
{
    Q_OBJECT
    QObject* cl;

public:
    Parent(QObject *parent=0):QObject(parent) {
            


        
23条回答
  •  抹茶落季
    2020-11-30 22:27

    I solved my problem by adding this to my header file :

    #ifndef MYCLASSNAME_H
    #define MYCLASSNAME_H
    
    ... // all the header file content.
    
    #endif
    

提交回复
热议问题