Qt World Summit: Register Today!

How to remove the Headers and Sources folder name appear in Qt Creator

  • Hello,

    I created the new project in Qt creator. Once i create the new project the header and source folder is automatically created. My problem is how to remove the header and source folder name appear in Qt creator

    Below is the screenshot



  • @Madhu-M-S ,

    Why do you want to remove?

  • Lifetime Qt Champion

    Enabled simplify tree
    alt text

  • Hi,

    I created two folders With name as Headers and Sources in my directory, what i want is the creator should show My directory folders (Headers, Sources). But it showing both that is, my directory folders as well as automatically created by creator. How to solve this problem

    below is the screenshot



  • Lifetime Qt Champion

    If they are in subfolder, the subfolders will be shown.
    Not possible to disable as far as i know.

  • Hi,

    I want to been shown sub folders, but how can i disable Qt creator created subfolders

  • @Madhu-M-S You can try "File System" view instead of "Projects" view. It works well if you have designed the folder hierachy so that everything is logically arranged in a normal file system viewer.

  • @Madhu-M-S ,

    Do you want to create your own subfolder?

  • Creator's project view shows how your build system thinks your project is structured. For qmake projects it will list the files you list as "HEADERS" in your .pro-file in a (virtual) folder called Headers, files listed in "SOURCES" are in a virtual folder called Sources, all below the .pro-file that contains the entries, etc.

    Creator needs such a view so that you can edit the build system structure itself by adding/removing files, etc. You need to see where those files are in your .pro/.pri-files and how the individual .pro/.pri-files relate to each other for that. And that is exactly what the projects view offers: There is little you can do to change that with "simplify tree" offering a somewhat more simple view on the same data.

    For navigation purposes you can try the filesystem view, which is straight files and folders on the disk. Or you just use Ctrl-K a lot to jump around your files and stop caring where the files are actually located on disk. I personally have never seen the need to have a navigation-focused view in the sidebar: 99% of the time I just jump to the places I care for using Ctrl-K which I find much faster to do than clicking through a tree of files. The 1% that is left is when I work with the build system itself and for that the projects view works well for me.

    Please feel free to file bug reports at bugreports.qt.io if you use Creator differently. I actually have a request open about a more configurable tree view for navigation purposes, feel free to vote on those up. It seems to be rather popular with windows users for some reason. Is that how you navigate in visual studio?

Log in to reply