Qt Creator 报错use of undeclared identifier ‘NULL‘;variable has incomplete type ‘QApplication‘

使用Ubuntu20.04,在 Qt Creator 中创建一个新项目时,有许多错误消息,代码可以正常编译。

解决方法:

原文:https://qa.1r1g.com/sf/ask/4241420361/

1、安装libclang-common-8-dev,并重新启动Qt Creator。

sudo apt install libclang-common-8-dev

2、禁用Clang 相关插件,并重新启动 Qt Creator

搜索Clang,取消ClangCodeModel,关闭,重新启动Qt。

猜你喜欢

转载自blog.csdn.net/WenHuiJun_/article/details/134116702