Important: Please read the Qt Code of Conduct -

Is there way for QtCreator to not separate files into Headers, Sources and Forms?

  • I'm finding it inconvenient to have my source files broken out into separate Headers, Sources and Forms directories. Is there a way to simply list them next to each other?

  • @kitfox

    You mean in creator's left pane under "Projects"?

    You could change to "File system" view in the combo box above. However, that is showing all files in folders.

  • Lifetime Qt Champion

    @kitfox Just choose "Simplify tree" from the funnel menu next to "Projects".


  • I suppose File System is closer to what I want. I am organizing my files on disk in folders according to their function, similar to the way I do when I'm writing for a language that uses packages. Having the directory tree structure helps me to keep track of what's where.

    The Simplify Tree option is not helpful because it does not show my directory structure at all that I'm using to organize files - it just displays everything in one long list.

    It would be nice to remain in Projects view and simply have QtCreator sort my files into separate Headers/Sources/Forms at the top level. I've seen other Qt projects that can do this, and I'm wondering how I could do it myself.

  • Lifetime Qt Champion

    You can have them in folders but it will split between .cpp and .h
    alt text

    However, you should try use
    ctrl + K for the super search one
    You can type some of the name and it lists all matches
    you can even use wildcards like *
    alt text

    This is much faster then finding files in the tree.

  • Is there a solution that qt does not separate files? Because we can organize ourselfs and dont need QtCreator to obscure it.

  • If you use CMake in Qt Creator you can use source_group to group your files in the IDE

  • I would like to down vote this unnecessary feature in a hope that it will be removed in a future update or at least made optional. It's not doing anything useful. Plus I had to change 20+ cmake files just to see my folder organisation properly.

  • Lifetime Qt Champion

    Personally, I like it as it reduces the number of files i have to look at the same time
    and I'm always sure i select the right one. (CPP / H)

    I don't think they will remove it but
    optional could be fine.
    (optional is always good as there are as many opinions as there are people:)

    But you have to go here
    and open an enhancement bug report. Then people can also vote for it.

Log in to reply