I’m developing my project in Visual Studio and I’m using qmake to create the solution file. I’m trying to organize the solution by introducing sub-folders to contain similar projects. However, the solution file produced by qmake has a folder hierarchy of only one level.
Is there any way to configure qmake to produce a folder hierarchy for Visual Studio, similar to the effect of “Add→New Solution Folder” in the Solution Explorer?
Edit: to clarify, suppose I have this directory structure:
MainDir
+--- GroupDir1
| +--- ProjectDir1
| +--- ProjectDir2
+--- GroupDir2
+--- ProjectDir3
I want the folder hierarchy in the solution as seen in Visual Studio to reflect just that, but this is the solution I manage to generate using qmake:
Solution
+--- ProjectDir1
+--- ProjectDir2
+--- ProjectDir3
what you are probably looking for is to add the following in your pro file
Take a look at the Qt documentation on this option
As an example, you can also take a look at this pro file which uses this option