My versions: Visual Studio Community 2022 and Qt 6.3.2.
When I compile my project, the error happens: Qt requires a C++17 compiler, and a suitable value for __cplusplus. On MSVC, you must pass the /Zc:__cplusplus option to the compiler.
I tried according to the tip and still it does not work.
Besides, the answer in How to fix Qt requires a C++17 compiler? does not work either.