Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Hide files included as .pri from project pane
Hello, I've seen this question asked before years ago and was wondering if any new features currently give the ability to disable showing files/directories that are explicitly included using the include(...) function and anything under HEADERS or SOURCES, while still using them for the project's qmake or make steps. Anything like a -hide flag or something? I've been sniffing on the internet and can't find much other than an old post that didn't really resolve the issue.
I have a project that includes 10+ .pri files and each one makes a folder in the project pane that just clutters the view a lot. I just don't want them to be visible in the pane view.
AFAIK, the official statement has always been, that the Project Tree should reflect the build system.
So no, there is no hiding implemented and no plans to do so. Alternative tools are File System view and Locator (hot tip!)
@aha_1980 Ahh okay. That's what I thought. Is there a better way I can organize my tree view so that when the project grows to add more libs I can reduce the amoint of QTreeViewItems in the QTreeView there are to 1 parent item instead of 1 to 1 parents for the amount of .pri files we have? I know if a .pri includes another .pri they'll structure it more like a child item, but I automated the process of generating them and they know nothing about each other.
My knowledge about
.prifile handling is too limited that I could say something useful.
But you could try the "Simplify Tree" checkbox in the funnel symbol for the Projects panel. It seems that may show the files in a more expected structure.
@aha_1980 simplifying the tree just lists all of the files in a single structure for me. I don't really want the user to know about the .pri since they shouldn't be editing it themselves. A python script scrapes the directory of another library with its own .pro to make a .pri of just the folder names to be added to the INCLUDEPATHS variable. This is so that in all dependent projects' header files can be included with just their name and no need for adding the relative path to resolve it. If this project grows to like 20 libraries, there will be 20 QTreeViewItems. It doesn't matter if it was a .pri or not, the include function in the .pro could do it to a .txt file for all it cared. I suppose what I want to do it currently impossible. Thank you for your input though because that means I can end my search.