In class A, I define a class B. I want to hide the implementation of class B. The class B inheirts from QObject. The code like follows:
// a.h class A : public QObject { Q_OBJECT public: explict A(QObjcet* parent=nullptr); private: class B; }; //a.cpp class A::B : public QObject { Q_OBJECT public: ... } A::A(QObject* parent) : QObject(parent) { } But it has errors:
undefined reference to 'vtable for A::B' undefined reference to 'a: