Disable Auto Header File Completion
-
Qt and tools I'm using:
Qt 5.15.16 QtCreator 8 clangd 19.1.7
I noticed that QtCreator would automatically add the headers when you enter some types. For example, if I type
QImage
and then pressEnter
, clangd adds#include "qimage.h"
on the top of the file. However I don't think I need it. Clangd will adds duplicated headers whether the correct file has been already included or not.
So I want to disable this feature if I can? -
Check your ClangD settings in Qt Creator. There's an option 'Insert header files on completion' , which you most likely enabled at one point.
-
C Christian Ehrlicher has marked this topic as solved on