'QObject::QObject' cannot access private member declared in class 'QObject'

前端 未结 5 537
天命终不由人
天命终不由人 2020-12-15 17:44
class CHIProjectData : public QObject
{
public:
    CHIProjectData();
    CHIProjectData(QMap aProjectData,
                   CHIAkmMetaData*         


        
5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-15 18:16

    In my case the problem was that the Q_OBJECT macro silently introduces a private: specifier, even within a struct:

    struct myClass : public QObject {
       Q_OBJECT
       // everything here is private now...
    }
    

提交回复
热议问题