Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Paths Qt uses
Forum Update on Monday, May 27th 2025

Paths Qt uses

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 445 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.
  • C Offline
    C Offline
    Colins2
    wrote on last edited by Colins2
    #1

    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.

    jsulmJ 1 Reply Last reply
    0
    • C Colins2

      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.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @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).

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      C 1 Reply Last reply
      6
      • jsulmJ jsulm

        @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).

        C Offline
        C Offline
        Colins2
        wrote on last edited by Colins2
        #3

        @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.

        jsulmJ 1 Reply Last reply
        0
        • C Colins2

          @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.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          C 1 Reply Last reply
          2
          • jsulmJ jsulm

            @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?

            C Offline
            C Offline
            Colins2
            wrote on last edited by
            #5

            @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.

            J.HilkJ 1 Reply Last reply
            0
            • C Colins2

              @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.

              J.HilkJ Offline
              J.HilkJ Offline
              J.Hilk
              Moderators
              wrote on last edited by
              #6

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


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              C 1 Reply Last reply
              2
              • J.HilkJ J.Hilk

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

                C Offline
                C Offline
                Colins2
                wrote on last edited by
                #7

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

                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