I downloaded the Qt 6.2.1 combined tar ball, extracted that and opened the toplevel CMakeLists.txt in Qt Creator.
Configuration succeeded and C++ indexing went through.
I then opened qformlayout.h put the cursor on QLayout (in "class QFormLayout : public QLayout") and did Follow Symbol Under Cursor.
That opened the header file with a relative path within the build directory "<qt>/build.../qtbase/include/QtWidgets/../../../../qt-everywhere-src-6.2.1/qtbase/src/widgets/kernel/qlayout.h
That results in the file not being considered "part of the project" (because the path is not cleaned and therefore not considered to be the same as the file in the project).