Because of cross-platform, when compiling the cpp code of QT, it is often switched between different operating systems, and sometimes the compiler's own header files such as iostream, vector and string can't be found. The solution is:
On the left side of qtcreator, click Clear System Environment Variables-Build Settings-Build Environment.
Remake, build