[SOLVED] Source folder and c++/hpp files not appearing in Qt Creator



  • I select "New File" or even "existing File" with right mouse click to the project and the file does not appear even though it is in the project directory.

    If I start a whole new project over it and select to add those folders right away -- no problem. But that's a high anxiety situation for obvious reasons -- plz help.



  • Hi and welcome to devnet,

    which platform? Qt Version?
    Are you using qmake based project or another type (CMake, Qbs, ...)??



  • Qt 5.4 OpenCV 2.4.11

    Hello,
    Yes I used cmake to compile the library and have used qmake as well. I installed Qt then linked it to OpenCV using the above modalities.

    Strange thing if I cut and pasted a pro file from a different file to a new one, without changing the Source name, the source file would disappear. If I changed it back to its correct source name it would reappear in the tree. Thought I figured it out, but the source file(s) in the tree began dropping out unexpectedly without any known cause.



  • Hi,

    if you use CMake to manage your project you have to add the new file in the CMakeList.txt to have it in the Project View.
    Qt Creator Manage automatically add a new file only for qmake projects



  • How can I tell whether I have a cmake project? I have the IDE that I build and run the project with (Qt Creator). I configure the.pro file. Where can I find makelist file? I don't see it in my project folder.

    I've been using the QtCreator to do everything.



  • Hi,

    if you have a .pro file do shouldn't have a CMakeLists.txt.
    The first decision you have to take
    Which tool I'll use to manage the build/deploy process?

    At the moment Qt Creator offers support for

    • qmake
    • CMake
    • Qbs


  • ok, so far I have been using the "build" and "build & run" options to compile and execute my code.

    I use Build File/Build Project in the menu as well as run/green arrow bottom left.

    Ive done some reading and I guess my question is almost too elementary, but why do I need to pick a tool when I have the QtCreator? I feel I am missing a simple point here. How would I use it with Qt Creator.

    How do I choose one?

    My scenario is a stable operating environment focused on machine vision programs development. for now the focus is less cross platform but protypical with the option to step it up.

    Thank you


  • Lifetime Qt Champion

    Hi,

    Like @mcosta wrote, Qt Creator is an IDE that support several project management facilities. Whether you want to use qmake, cmake or QBS to handle your project is up to you. You should take the time to compare these options and see which one suits your needs best.

    AFAIK, by default, Qt Creator uses qmake by default.



  • @SGaist

    The opencv/Qt library were joined with C-make version 3.xxx. A few make commands were used to install the code. I'm thinking of using a tool that has already been used to configure the environment now that I am trying to stabilize, qmake the default.

    The question is how does the tools designation help me with folders dropping off, and the IDE needing LESS specific information for referencing files:

    LIBS += -LC:\OpenCV-2.3.1\bin
    -lopencv_core2411.dll
    -lopencv_highgui2411.dll
    -lopencv_imgproc2411.dll
    -lopencv_features2d2411.dll
    -lopencv_calib3d2411.dll
    <All errors>(DLL)
    LIBS += -LC:\OpenCV-2.3.1\bin
    -lopencv_core2411
    -lopencv_highgui2411
    -lopencv_imgproc2411
    -lopencv_features2d2411
    -lopencv_calib3d2411
    <No DLL>
    <none, we are golden> executes fine
    I think I may have found out what was causing the folders to dissappear: going to projects and not selecting release build creates the behavior when creating a new project.

    These errors brought me here - 1 I think is solved. Please tell me the next step after tool consideration. Its pretty obvious for a cmake made project that one would continue to use cmake? Does the DLL behavior suggest any bias towards any one of the tools?



  • Main Topic Solved - environmental variable at project creation were responsible.

    [SOLVED]



  • Hi,

    put [SOLVED] as prefix of the thread title


Log in to reply
 

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