Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Is there way for QtCreator to not separate files into Headers, Sources and Forms?
Forum Update on Monday, May 27th 2025

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

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
10 Posts 8 Posters 2.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kitfox
    wrote on last edited by
    #1

    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?

    K aha_1980A 2 Replies Last reply
    2
    • K kitfox

      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?

      K Offline
      K Offline
      koahnig
      wrote on last edited by koahnig
      #2

      @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.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      3
      • K kitfox

        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?

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3

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

        Regards

        Qt has to stay free or it will die.

        1 Reply Last reply
        4
        • K Offline
          K Offline
          kitfox
          wrote on last edited by
          #4

          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.

          mrjjM 1 Reply Last reply
          1
          • K kitfox

            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.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @kitfox
            Hi
            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.

            1 Reply Last reply
            2
            • B Offline
              B Offline
              Benjamin Hampe
              wrote on last edited by
              #6

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

              1 Reply Last reply
              1
              • VRoninV Offline
                VRoninV Offline
                VRonin
                wrote on last edited by VRonin
                #7

                If you use CMake in Qt Creator you can use source_group to group your files in the IDE https://cmake.org/cmake/help/latest/command/source_group.html

                "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                ~Napoleon Bonaparte

                On a crusade to banish setIndexWidget() from the holy land of Qt

                1 Reply Last reply
                3
                • millagM Offline
                  millagM Offline
                  millag
                  wrote on last edited by millag
                  #8

                  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.

                  mrjjM 1 Reply Last reply
                  1
                  • millagM millag

                    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.

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @millag
                    Hi
                    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
                    https://bugreports.qt.io/secure/Dashboard.jspa
                    and open an enhancement bug report. Then people can also vote for it.

                    1 Reply Last reply
                    1
                    • J Offline
                      J Offline
                      Jeremy_Murphy
                      wrote on last edited by
                      #10

                      Dear @kitfox ,

                      Since Qt Creator 5, there is an option to disable the automatic (and in my opinion, annoying) classification of files into header and source: https://www.qt.io/blog/qt-creator-5-cmake-projects-update

                      Regards,

                      Jeremy

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved