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

Using Ubuntu20.04, when creating a new project in Qt Creator, there are many error messages, but the code compiles normally.

Solution:

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

1. Installationlibclang-common-8-dev,并重新启动Qt Creator。

sudo apt install libclang-common-8-dev

2. Disable Clang related plug-ins and restart Qt Creator.

Search for Clang, cancel ClangCodeModel, close, and restart Qt.

Guess you like

Origin blog.csdn.net/WenHuiJun_/article/details/134116702