error C2338: No Q_OBJECT in the class with the signal (NodeCreator.cpp)

In Qt, when the derived class will need to signal slots mechanism, there are two requirements.

1, which is derived from QObject class.

2, class has Q_OBJECT macros.

The reason is because there is no error in the class Q_OBJECT add macros.

 

And my error cause more sucker, clearly aware of the need to add Q_OBJECT macro, but this hand-written disabled.

 

 

 

Guess you like

Origin www.cnblogs.com/XiaoXiaoShuai-/p/11788013.html