OK I just checked the directories and files output by the code:
QDirIterator it(":", QDirIterator::Subdirectories); while (it.hasNext()) { qDebug() << it.next(); }and the file is stored as absolute path.
I changed the related CMake code to
qt6_add_resources(TP_ui "image" PREFIX "/image" BASE "${PROJECT_SOURCE_DIR}/image" FILES ${TP_IMAGE_FILES} )and solved the problem.