Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Creator 2.7 non-qt project can't add files

    General and Desktop
    4
    5
    11666
    Loading More Posts
    • 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.
    • G
      Gorkadread last edited by

      Hi.

      I'm sitting in Ubuntu 12.04 with Qt Creator v2.7 (tried new one aswell, 2.8 beta) and when I create a Non-Qt Project / Plain C++ Project (CMake Build) all seems well. But when I right-click on the project to Add New, that option is disabled. So is Add Existing Files..., New Subproject and Add Library.

      Am I missing something obvious? I think I've been through pretty much all of the menus but I can't find anything seemingly related to this issue.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        IFAIK the cmake support is not as complete as the qmake one. You still need to add things manually.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • G
          Guigui last edited by

          I've been working with Cmake for a while now with Qt Creator, and you do have to do most of the work manually, at least for now. The file structure of your project must be managed manually. Loading a Cmake project with Qt Creator creates a Project structure (in the Projects view) that will only contain files declared in the Cmake files, which might not reflect what is actually in your project folders on the file system. After adding new files to both the file system and cmake files, you should run cmake again to make them appear in Qt Creator.

          1 Reply Last reply Reply Quote 0
          • G
            Gorkadread last edited by

            Thank you both for your answers. It seems I have not really understood what Cmake is and what it does :) I'll start reading up on how to use it tonight. Thanks again!

            1 Reply Last reply Reply Quote 0
            • T
              tobias.hunger last edited by

              Creator does indeed only support adding files to qmake projects for now. There are no plans to add this feature to other build systems (with the exception of qbs at some point) as we just do not have enough information on where (which file and or the position in the file) the new file names need to be inserted.

              Some build systems are just not made with IDEs in mind... there is little we can do about that. Sorry.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post