enum类型报“is not a class or namespace”错误

阅读 60

2022-05-05

在使用qtWebApp包时,通过配置文件.ini导入logging包后编译报错
error: ‘QtMsgType’ is not a class or namespace minLevel=QtMsgType::QtWarning

在于:
qlogging.h中
enum QtMsgType { QtDebugMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtInfoMsg, QtSystemMsg = QtCriticalMsg };

filelogger.cpp中
48行:调用minLevel=QtMsgType::QtFatalMsg;
枚举类型对于封装后的包不能这么使用

应改为minLevel=QtDebugMsg;

精彩评论(0)

0 0 举报