If you like to organize your project by keeping source files in different subdirectories, you should know that during a build qmake will not preserve this directory structure and it will keep all the ".o" files in a single build directory. This can be a problem if you had conflicting file names in different directories like following.
Now qmake will decide to create two "file1.o" files in a build directory, causing one of them to be overwritten by another. The buld will fail. To prevent this you can add
CONFIG += object_parallel_to_source configuration option to your "pro" file.
This will tell qmake to generate build files that preserve your source directory structure. This way your build directory will reflect source directory structure and object files will be created in separate subdirectories.
QT += core TARGET = myapp TEMPLATE = app CONFIG += object_parallel_to_source SOURCES += src/file1.cpp \ src/plugin/file1.cpp HEADERS += src/plugin/file1.h
CONFIG option is not officially documented.
if you want to reproduce, please indicate the source:
qt – qmake – Preserving source directory structure in a build (undocumented "object_parallel_to_source" option). - CodeDay