QtCreator only showing ".." instead of the project



  • I imported a CMakeLists-based project in QtCreator, and in the "Projects" tab, where you can normally see the folders, all it shows me is "..". I can press the down-arrow and it shows me multiple levels of "..", and after 8 levels, "opt" and "user".

    How can I fix this?



  • What directory structure do you get if you run cmake from command line?



  • Everything is fine from the cmd-line (been using it for years). My structure looks like this (out of source build):

    MyProject/build/debug // <- for cmdline-build
    MyProject/build/qtcreator // <- for qtcreator-build
    MyProject/Source/CMakeLists.txt // <- source-code and everything

    And from cmd-line and qtcreator I run:

    cmake -C ../../Source/initial_cache.cmake ../../Source/ -DCMAKE_BUILD_TYPE=debug



  • When you import cmake project qtcreator asks to run cmake with some parameters.
    Was the output of that run different from what you get when you run cmake from command line?
    Did you try to import this project in different version of QtCreator?
    Did it work?



  • Was the output of that run different from what you get when you run cmake from command line?

    No, it looks exactly the same.

    Did you try to import this project in different version of QtCreator?

    Well, I didn't have this problem a few months ago, with an older version of QtCreator (I'm now on 3.1.2, the old one was 3.0.1 or something).
    While I changed a few things in the CMake-scripts as well in the meantime, it was nothing that on first glance should produce this behaviour.



  • It is possible that you discovered a regression in new qtcreator.
    If you have old qtcreator could you try to import your project there to see if it still works.



  • I can't find old 3.x.y versions at http://download.qt-project.org/archive/ unfortunately. Where are these archived?





  • Hm I just tried. It's a bit weird, qtcreator 3.0.1 kind of picks up all settings from 3.1.2, so if I open my project in 3.0.1, it doesn't ask me again to run CMake and stuff, so it's not surprising that it now shows the same defect.



  • Right. You need to delete .user file before opening the project. Then qtcreator will ask you to re-run cmake.
    Also you may try to hide your current setting by moving
    @
    $HOME/.config/QtCreator*
    @
    to some other place. QtCreator will re-create it on first start with default settings.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.