标签:
新建类中,若要自己定义槽函数,出现了CAN
官方指南如下:
The Q_OBJECT macro must appear in the private section of a class definition that declares its own signals and slots or that uses other services provided by Qt‘s meta-object system.
所以,如果要定义自己的槽函数,必须要定义类的时候,加上Q_OBJECT宏定义,问题不再出现。
标签:
原文地址:http://www.cnblogs.com/wuwenzhou/p/5511615.html