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. QtCreator and CMake
QtWS25 Last Chance

QtCreator and CMake

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

    I have a cmake project that is using qt libraries. The project builds just fine. When I open it in QtCreator I would expect it to show project files in Projects pane. Instead it only shows CMakeLists.txt file just under my project name. The .cbp file in build directory exists and contains references to my files. However, it doesn't seem to be used in any way by QtCreator.
    Should the files be shown in Projects pane? If so, how do I make it work?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rahul Das
      wrote on last edited by
      #2

      It should show the project ,perfectly!

      When you open the cmakelists.txt , creator must ask you to run cmake first right. Check if cmake runs successfully.


      Declaration of (Platform) independence.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tomasz_grobelny
        wrote on last edited by
        #3

        It does ask, I select nmake vc 9.0 generator, I don't give any additional arguments, cmake runs and does not show any errors. Still the only file under my project name is CMakeLists.txt file. Maybe the CMakeLists.txt file needs to be written in some specific way to be picked up by QtCreator? Or maybe Qt has some log to be looked into? BTW, this is a dll project (qt designer plugin) and I'm using QtCreator 2.3.0 (same happens with 2.1.0).

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Rahul Das
          wrote on last edited by
          #4

          May be you haven't selected the "Project View", i think you have selected the "class view " or so..


          Declaration of (Platform) independence.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tomasz_grobelny
            wrote on last edited by
            #5

            I moved my project to a different location and it started to work. Maybe QtCreator has problems with spaces in paths?

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Rahul Das
              wrote on last edited by
              #6

              Yes, There are issues with spaces.. See project issues in "here":http://doc.qt.nokia.com/qtcreator-snapshot/creator-known-issues.html


              Declaration of (Platform) independence.

              1 Reply Last reply
              0
              • H Offline
                H Offline
                hisoft
                wrote on last edited by
                #7

                Hi,

                I'm encountering the same problem. When i try to open a Cmake projet (on Qt 4.7) with qt-creator 2.3 (on Qt 4.8), it only shows CMakeLists.txt file. Paths or file names don't contain spaces or special characters.

                Is there any other explanation ?

                Regards

                1 Reply Last reply
                0
                • AngeloA Offline
                  AngeloA Offline
                  Angelo
                  wrote on last edited by
                  #8

                  Sorry for the bump, but since this shows up in Google as a first result for "qt creator cmake shows only cmakelists.txt", figured I'd reply directly.

                  The solution to this is likely that the Qt Creator kit cmake properties aren't correctly set up to generate a Codeblocks project file. This could happen if you install Qt Creator before installing CMake.

                  To fix, go to Tools -> Options -> Build & Run -> Kits -> Pick whatever you're using -> Set "CMake Generator" to "CodeBlocks - Unix Makefiles".

                  1 Reply Last reply
                  1

                  • Login

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