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. Can't remove files or create directories?
Forum Updated to NodeBB v4.3 + New Features

Can't remove files or create directories?

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 2 Posters 8.3k Views 1 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.
  • A Offline
    A Offline
    anders
    wrote on last edited by
    #1

    This must just be me being stupid, but if I create a new non-qt C++ project, I can't delete the remove the default main.cpp from the project! The option is greyed out on the right-click menu.

    I can add new files ok, but I want to organize them into subfolders (my project will have several targets and I want to keep it neat). How do I create a folder? There's a "create new subproject" option in the right-click menu, but that's greyed out. If I try adding a new file to the project I can use the file dialog to create a folder on the filesystem and put the file in that, but it's not shown in the tree view!

    What am I doing wrong? I'm on os x 10.7. I get the same results in creator 2.5 and 2.6

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

      Short answer: you can't.

      Simplest way is most likely to just edit the .pro-file and to create the directory manually.

      Project view shows the structure of the project files. "Folders" there are not necessarily found in the filesystem. A subproject is just a .pro-file that gets referenced in its parent .pro-file.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        anders
        wrote on last edited by
        #3

        Thanks Tobias! OK that makes sense, but any idea why the create subprojects or remove files?

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

          Whether Creator can add/remove files depends a lot on the build system you use: We can do that on qmake, but for cmake and others that is basically impossible to do correctly. So maybe you are just using the "wrong" build system for those operations.

          I don't have enough information to provide a definitive answer, sorry.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            anders
            wrote on last edited by
            #5

            Ah ok that makes sense - creator is using the CMakeLists.txt as a project file as well then? Is there any way of doing a hybrid setup? So I would use qmake .pro files as the project file but actually use cmake for building?

            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