@SimonSchroeder That's a very important point!
I have solved my immediate problems like this:
I deleted GCC-13 from the kits/compilers.
I used sudo update-alternatives to make /usr/bin/gcc point to my GCC14.2 homebrew installation.
That worked partially but GCC-14.2 doesn't handle modules properly and nor does it reliably handle vcpkg packages!
(I have been using clang-19.1 with VS Code for the project/tutorials mentioned above and that does work)
I struggled to get QtCreator to use the clang compiler but at last found the solution, albeit using a sledgehammer to crack a nut!
Delete GCC entries from the Kits/compilers section. My Qt installation already found clang as it was in my path.
Added 'export $CXX=clang to my .bashrc. Not sure how necessary this is but it was mentioned in an error message.
3)Added the line "set(CMAKE_CXX_COMPILER clang++)" to CMakeLists before "project(helloClang LANGUAGES CXX)"
Now my little helloClang compiles with the clang compiler.
I added a vcpkg statement and the fmt library with the appropriate lines in CMakeLists - and it works!
I haven't had time to try out modules yet but I'm sure they will work as well.
I don't think it was really necessary to delete the GCC kits, probably setting the compiler in CMakeLists may be enough.
I will continue experimenting to see what works.
None of this is necessary in VS Code, it's a simple drop-down menu to select the compiler when configuring initially. Also, there are no entries in the CMakeLists file nor environmental variables set.
An equivalent in QtCreator would be to just go to the kits page and select the wanted compiler and click Apply/OK but this does not work.
I'm just pleased that I will be able to use modules and vcpkg packages from QtCreator now.