Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtCreator 4.11.x Ignores Source Code Directory Structure with CMake

QtCreator 4.11.x Ignores Source Code Directory Structure with CMake

Scheduled Pinned Locked Moved Solved General and Desktop
qt creatorcmake
5 Posts 3 Posters 823 Views 3 Watching
  • 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.
  • T Offline
    T Offline
    ted dr
    wrote on last edited by ted dr
    #1
    • Up to Qt 5.13.x (Qt Creator 4.10.x) I could see my custom folder structure in Qt Creator like this:

       + Project Name
        |
        + CMakeLists.txt
        + include (* Custom Name)
                   |
                   + custom_include_subdir_1
                   + custom_include_subdir_2
                   + ...
      
        + src (* Custom Name)
                   | 
                   + custom_src_subdir_1 (e.g models)
                   + custom_src_subdir_2 (e.g ui)
                   + custom_src_subdir_3 (e.g resource)
                   + ...
      
        + etc (* Custom Name)
      
    • But starting in Qt Creator 4.11.x, all folder structures are ignored and files are sorted in 2 main folders (Source & Headers):

      + Project Name
        |
        + CMakeLists.txt
        + Source Files
                   |
                   + All *.h files without folder structure
      
        + Header Files
                   | 
                   + All *.cpp files without folder structure
      
        + QML & UI Files (without folder structure)
      
    • Note that this has nothing to do with "Simplify Tree" option. This seems to be something with CMake projects. Is there any way I could restore old structure or should I go back to Qt Creator 10.x?

    Regards.

    UPDATE
    Thanks to @mrjj
    Installing 4.11.1 seems to have fixed this issue but a new one appeared. Now if you're working in group projects across multiple IDEs, this would be the project's structure:

      + Project Name
        |
        + CMakeLists.txt
        + Header Files
                   |
                   + "incl" folder (or any other root folder for header files)
                                      |
                                      + incl_subdir_0 folder
                                      + incl_subdir_1 folder
                                      + ...
    
        + Source Files
                   |
                   + "src" folder (or any other root folder for source files)
                                      |
                                      + src_subdir_0 folder
                                      + src_subdir_1 folder
                                      + ...
    
        + QML & UI Files
    

    This isn't as problematic as before, but it's still ugly. I hope developers would remove this feature or make it optional at least. This would become problematic with standard structured folders across multiple IDEs.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Did you try 4.11.1 ?
      https://bugreports.qt.io/browse/QTCREATORBUG-23372
      Seems related.

      aha_1980A T 2 Replies Last reply
      3
      • mrjjM mrjj

        Hi
        Did you try 4.11.1 ?
        https://bugreports.qt.io/browse/QTCREATORBUG-23372
        Seems related.

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

        and to add to @mrjj,

        the final fix is in 4.12.

        Regards

        Qt has to stay free or it will die.

        1 Reply Last reply
        4
        • mrjjM mrjj

          Hi
          Did you try 4.11.1 ?
          https://bugreports.qt.io/browse/QTCREATORBUG-23372
          Seems related.

          T Offline
          T Offline
          ted dr
          wrote on last edited by
          #4

          @mrjj Hi & Thanks.
          I tried it and I can confirm that it is fixed but there's still something funny that I included in my question's update.

          mrjjM 1 Reply Last reply
          1
          • T ted dr

            @mrjj Hi & Thanks.
            I tried it and I can confirm that it is fixed but there's still something funny that I included in my question's update.

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

            @ted-dr

            HI

            • I hope developers would remove this feature or make it optional at least. This would become problematic with standard structured folders across multiple IDEs.

            Feel free to open an enhancement ticket and post link here.
            People can then vote for it, if they like you - feel the good old way was the best and
            if enough votes then it might happen :)

            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