在头文件中添加Q_OBJECT宏 如果出现如下报错: Class contains Q_OBJECT macro but does not inherit from QObject 则,将该类继承QObject类