Project Tree: Source and Headers Inconsistent View
-
On the tree/folders showing the files in the project, the header files are shown directly under the project name as I would expect them to, but the source files have a whole directory tree all the way down to the project folder:

I would prefer to see both the source and headers the same way the headers appear, relative to the project folder. I do not need to see the entire directory tree all the way down to the project folder.
Is there a way to change this?
-
C Christian Ehrlicher moved this topic from General and Desktop on
-
Don't use absolute paths for your source files in your project.
@Christian-Ehrlicher said in Project Tree: Source and Headers Inconsistent View:
Don't use absolute paths for your source files in your project.
I am not. Both source and headers are specified in EXACTLY the same way, but one is being displayed with the absolute path and the other isn't.
That said, in fixing an unrelated problem, I had to re-create the project file (changing from cmake to qmake). This fixed this problem and now both show relative to the project directory. It doesn't explain why it was doing that, but since I won't be switching back, it doesn't matter for me.
-
On the tree/folders showing the files in the project, the header files are shown directly under the project name as I would expect them to, but the source files have a whole directory tree all the way down to the project folder:

I would prefer to see both the source and headers the same way the headers appear, relative to the project folder. I do not need to see the entire directory tree all the way down to the project folder.
Is there a way to change this?
Don't use absolute paths for your source files in your project.
-
On the tree/folders showing the files in the project, the header files are shown directly under the project name as I would expect them to, but the source files have a whole directory tree all the way down to the project folder:

I would prefer to see both the source and headers the same way the headers appear, relative to the project folder. I do not need to see the entire directory tree all the way down to the project folder.
Is there a way to change this?
@Calvin-H-C
You have several options in Filter Tree pull down menu:
Simplify tree and Hide header and source groupssee Projects View Toolbar here:
https://doc.qt.io/qtcreator/creator-projects-view.html -
Don't use absolute paths for your source files in your project.
@Christian-Ehrlicher said in Project Tree: Source and Headers Inconsistent View:
Don't use absolute paths for your source files in your project.
I am not. Both source and headers are specified in EXACTLY the same way, but one is being displayed with the absolute path and the other isn't.
That said, in fixing an unrelated problem, I had to re-create the project file (changing from cmake to qmake). This fixed this problem and now both show relative to the project directory. It doesn't explain why it was doing that, but since I won't be switching back, it doesn't matter for me.
-
C Calvin H-C has marked this topic as solved on