One of big disadvantage when creating Visual studio project from .pro files using qmake is missing support for hierachical folders. All files are stored in in four folders (filters) named "Source Files", "Header Files", "Generated Files" and "Form Files". When you have large project, this arrangement is really hard to use.
qmake has undocumented setting parameter "flat". Using this switch, you can tell qmake to create filters in Visual studio dependent to directory structures of files. Only drawback of this solution is continuing sorting to "Source files","Header files",...
To achieve this behaviour, only thing what have to be done is add following line to your .pro file:
But what to do when you want to have all files stored together in structure dependent on directory structure? Only solution which I found is update qmake project for myself. This update is simply and here is what is need to be done:
Add new method initHeaderAndSourceFiles to file msvc_vcproj.cpp and .h with following content
and update method VcprojGenerator::initProject() in msvc_vcproj.cpp file. Replace following two lines (currently located on line 762)
with following code:
Now you can add new flag "grouped" to your .pro file. After that, source and header files will be merged in the visual studio project tree.