Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Paths Qt uses



  • I have a couple of observations and comments that I'd like more knowledgeable users to answer if possible.

    First, I changed the default build directories in my profile, purely as a personal preference, to one I am more used to.
    I prefer to have ....\Qt_Programs\projectsource\platform\Debug and ....\platform\release. It all works fine and the executables end up in the right place.
    I get a warning from Qt Creator that the build directories should be on the same level as the source code e.g.
    .....\Qt_Programs\Very-long-generated-hello-world-name-Debug and ..\Very-long-generated-hello-world-name-Release
    Is there any real reason for this? Does it make any difference? I can't see why it should.

    Secondly, I have just discovered that Qt Creator doesn't use the built binaries to run programs, instead it compiles and runs from the source directory and presumably keeps the executable in memory to run. This means that the build function is only really to check for errors, while developing, and to run for testing it is only necessary to hit the run or run-debug buttons as it will build on-demand.
    Obviously, the old hands will be fully aware of this but it's a different setup to me and I was surprised.

    Lastly, I have Qt installed on 2 x Linux boots, Debian 10 and Mint 19 and also on Windows 10(64) - all on the same computer.
    The computer is pretty capable Xeon E2650 v2 8/16 @2.6Ghz with 32GB ram but Qt runs much slower under Windows than it does on either of the Linux platforms. Watching on-line tutorials, I get around the same speed under Linux as the tutors but not under Windows. Running a program from within Creator is also very slow to start up but once running the speed is OK.
    I have tried with quite a few of the examples / tutorials and they are all the same.
    Is there any 'tuning' I can do to improve the speed?

    I should add that I have changed the build paths on Linux the same as Windows.


  • Lifetime Qt Champion

    @Colins2 said in Paths Qt uses:

    Is there any real reason for this?

    Yes, usually one does not want to pollute the source tree with build artefacts especially when using source code version systems like Git. Because Git would show all the build artefacts as not belonging to the project and this is annoying. And you will not be able to use "git add -A" as it would add all your build artefacts to your repository.

    "Secondly, I have just discovered that Qt Creator doesn't use the built binaries to run programs, instead it compiles and runs from the source directory and presumably keeps the executable in memory to run" - that would be new to me. QtCreator executes the executable which was created during build where-ever this executable is stored.

    "Is there any 'tuning' I can do to improve the speed?" - when using make add "-j" parameter in build configuration with a number of parallel jobs, like: -j 4 (if you have 4 logical CPU cores).



  • @jsulm

    Thanks for your reply
    regarding the build path, OK, I understand. I have reset to the default so that warning has gone now. I'm not too concerned about Git as I don't use it but I don't like to see error/warning messages.

    I was getting confused because my app was looking for a file in the run directory and not finding it. My fault, I created it in explorer, rather than programmatically and completely forgot the added and hidden .txt extension - duh!

    Qt already adds -j16 to the make command (8 processors / 16 cores) but it's not the compile speed I meant. I was referring to the speed of Qt Creator. It is painfully slow and I can't see why it should be and it is just the Windows version, the Linux version works fine.


  • Lifetime Qt Champion

    @Colins2 said in Paths Qt uses:

    It is painfully slow

    Interesting. Did you try to disable anti-virus software, if any is running, to see whether it makes a difference?



  • @jsulm
    I didn't try that. I only have Windows Defender and Malawarebytes running, no 3rd party anti-virus.
    All other programs seem to run OK.


  • Moderators

    @Colins2
    just a shot in the dark, but try disabling the ClangCodeModel plugin. May speed up qt creator



  • @J-Hilk
    Thanks!
    I found quite a lot of stuff I wasn't using and disabled it. Qt Creator runs faster now.


Log in to reply