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. Files do not appear in Projects list

Files do not appear in Projects list

Scheduled Pinned Locked Moved Qt Creator and other tools
7 Posts 4 Posters 3.4k 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.
  • D Offline
    D Offline
    daviddoria
    wrote on last edited by
    #1

    I have created my project in QtCreator by opening an existing CMakeLists.txt file. On the "Edit" tab, in the "Projects" panel, I see the directory structure of my project, but only a few (6) out of the hundreds of source files in my project appear inside the directories. If I switch to "File System" in the drop down (verus "Projects"), I can see all the files. Is there a reason that the files would not have been included in the project? A pattern might be that it got the .cpp files, but skipped the .h and .hpp files?

    Thanks,

    David

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Creator will only see the files cmake considers to be part of the project. Unfortunately CMake projects tend to only list the source files:-(

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Duck
        wrote on last edited by
        #3

        Are the "missing" files mentioned in the CMakeLists.txt? If so, can you give a pointer to that file?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          daviddoria
          wrote on last edited by
          #4

          Duck, no, the hpp files are not required to be listed in the CMakeLists.txt because they are not compiled explicitly into their own objects.

          Is there a way to list these files in the CMake? Is there a "good CMake style" way to do this (since it works without the files being mentioned explicitly, it seems like there must be a special way to say "these files are part of the project, but don't do anything with them"?).

          Thanks,

          David

          1 Reply Last reply
          0
          • D Offline
            D Offline
            Duck
            wrote on last edited by
            #5

            I'd expect just adding the headers in the same place where you add the sources would do the trick. Whether that is good cmake style I don't know (I am not using it), but from Creator's point of view the question whether a certain file is considered "part of the project" or "part of the system" is answered by whether it is mentioned in the project file, independent of the build system.

            1 Reply Last reply
            0
            • B Offline
              B Offline
              braggpeaks
              wrote on last edited by
              #6

              I had another issue and came to this topic:

              Project files didn't show up in combination with CMake if the current directory has whitespaces (e.g. "Program Files (x86)" in it. Only CMakeLists.txt was listed in QtCreator 2.7.0, however, building succeeded without errors.

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tobias.hunger
                wrote on last edited by
                #7

                braggpeaks: Please do not abduct threads. Open your own!

                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