Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt project with visual studio, compilation time
Qt 6.12 LTS is out! See what's new in the release blog

Qt project with visual studio, compilation time

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 3 Posters 1.5k 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.
  • P Offline
    P Offline
    Pierre_VBI
    wrote on last edited by
    #1

    Hello,
    I have a C++ Qt project that I develop with visual studio 2022, using the Qt VS tool.
    Everything works fine, except that when I change a .h file (for instance adding a int variable), the project compiles in 3 minutes.
    When I do exactly the same (i.e adding a variable on a .h file), with Qt creator, it takes only 40 seconds to compile.
    When I modify a .cpp file, it's much quicker and I don't have a big difference of compilation time between Qt creator and visual studio

    Do you have an idea on why there is such a big difference on the compilation time in Qt creator and visual studio, and how could I solve that?
    Thank you.

    jsulmJ JonBJ 2 Replies Last reply
    0
    • P Pierre_VBI

      Hello,
      I have a C++ Qt project that I develop with visual studio 2022, using the Qt VS tool.
      Everything works fine, except that when I change a .h file (for instance adding a int variable), the project compiles in 3 minutes.
      When I do exactly the same (i.e adding a variable on a .h file), with Qt creator, it takes only 40 seconds to compile.
      When I modify a .cpp file, it's much quicker and I don't have a big difference of compilation time between Qt creator and visual studio

      Do you have an idea on why there is such a big difference on the compilation time in Qt creator and visual studio, and how could I solve that?
      Thank you.

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

      @Pierre_VBI Is it the same code base you're building in VS and QtCreator and is it the same header file you're changing?

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

      P 1 Reply Last reply
      0
      • P Pierre_VBI

        Hello,
        I have a C++ Qt project that I develop with visual studio 2022, using the Qt VS tool.
        Everything works fine, except that when I change a .h file (for instance adding a int variable), the project compiles in 3 minutes.
        When I do exactly the same (i.e adding a variable on a .h file), with Qt creator, it takes only 40 seconds to compile.
        When I modify a .cpp file, it's much quicker and I don't have a big difference of compilation time between Qt creator and visual studio

        Do you have an idea on why there is such a big difference on the compilation time in Qt creator and visual studio, and how could I solve that?
        Thank you.

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @Pierre_VBI
        ...And do they use identical compiler options, e.g. wrt pre-compiled headers...?

        P 1 Reply Last reply
        0
        • jsulmJ jsulm

          @Pierre_VBI Is it the same code base you're building in VS and QtCreator and is it the same header file you're changing?

          P Offline
          P Offline
          Pierre_VBI
          wrote on last edited by
          #4

          @jsulm yes exactly the same

          1 Reply Last reply
          0
          • JonBJ JonB

            @Pierre_VBI
            ...And do they use identical compiler options, e.g. wrt pre-compiled headers...?

            P Offline
            P Offline
            Pierre_VBI
            wrote on last edited by
            #5

            @JonB I guess everything is the same.
            Actually I started this project with Qt creator, and used the option on the .pro file :
            TEMPLATE = vcapp
            This generates automatically the same project on visual studio (.cvxproj file, with normally the same options)

            1 Reply Last reply
            0

            • Login

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