QT子类继承父类又继承了QObject类:error: ‘子类‘ is not a member of ‘父类‘

问题:

今天在qt编译的时候发现一直编译不过,错误如下:
error: ‘staticMetaObject’ is not a member of ‘ISystemState’

解决方法

原因是子类在集成父类的时候,也集成了QObject这个类,所以只需要把QObject这个类写在你继承的这个类前面就可以了。

你可能感兴趣的:(problem,analysis,qt,开发语言)