Connection of pure virtual signal of interface class
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to connect some object's signals derived from an interface class. The connection is done in QWidget::listenToAnimal(AnimalInterface*) . This does not work because qt_metacall is not a member of 'AnimalInterface' and static assertion failed: No Q_OBJECT in the class with the signal . Of course AnimalInterface does not have the Q_OBJECT macro and does not inherit QObject because it is an interface... I want to connect through the interface class because I do not want to manually retype the same code for Cat and for Dog . Is it possible