Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to convert a Visual Studio project to use Qt VS Tools
QtWS25 Last Chance

How to convert a Visual Studio project to use Qt VS Tools

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
9 Posts 2 Posters 2.4k 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by
    #1

    Using VS2019 and VS Tools 2.9.1 Rev. 6.

    I have a number of Visual Studio projects which I need to modify or convert to use Qt VS Tools.

    What is the correct approach to achieve this. I've seen conflicting reports of how it should be done on Stack Overflow, so felt I needed to come here to get the correct procedure.

    Many thanks
    David

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      You've already asked that :) Convert Visual Studio 2017 Solution to use Qt

      Should be similar for the newer versions. There's no officially supported procedure, so there's no "correct" way to do it. Only what works for you.

      1 Reply Last reply
      0
      • PerdrixP Offline
        PerdrixP Offline
        Perdrix
        wrote on last edited by
        #3

        Oh dear how the memory fails as you get older.

        1 Reply Last reply
        0
        • Chris KawaC Offline
          Chris KawaC Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hah, a couple of times now I was looking for some information and found my own post giving that information to someone couple years earlier. Yup, human brains don't age well.

          1 Reply Last reply
          0
          • PerdrixP Offline
            PerdrixP Offline
            Perdrix
            wrote on last edited by
            #5

            Well I did this:

            <PropertyGroup Label="Globals">
              <SccProjectName />
              <SccLocalPath />
                <Keyword>QtVS_v302</Keyword>
              <ProjectGuid>{1747F255-9CB9-472B-8FEE-9E0BBFBAD49D}</ProjectGuid>
              <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
            </PropertyGroup>
            

            reloaded the project and did the Extensions/Qt VS Tools/Convert custom build steps..

            and got:

            998fbc93-34af-4efa-a4df-1fa4120ecb3b-image.png

            😦
            David

            1 Reply Last reply
            0
            • Chris KawaC Offline
              Chris KawaC Offline
              Chris Kawa
              Lifetime Qt Champion
              wrote on last edited by Chris Kawa
              #6

              The version of the Qt VS Tools extension changed since then. Currently it's QtVS_v304. Try that, it works for me.
              Also make sure you have your solution selected in solution explorer when you run that option.

              1 Reply Last reply
              0
              • PerdrixP Offline
                PerdrixP Offline
                Perdrix
                wrote on last edited by
                #7

                I tried that and still got the same message.

                The project in question builds a static library (that may be relevant).

                I did manage to convert a command line project, but when I tried to build it I got:

                2>------ Build started: Project: DeepSkyStackerCL, Configuration: Release x64 ------
                2>C:\Users\amonra\AppData\Local\QtMsBuild\qt_vars.targets(68,5): error : There's no Qt version assigned to project DeepSkyStackerCL.vcxproj for configuration Release/x64.
                2>C:\Users\amonra\AppData\Local\QtMsBuild\qt_vars.targets(68,5): error : Please set a Qt installation in 'Project|Properties|Configuration Properties|Qt Project Settings|Qt Installation'.
                2>Done building project "DeepSkyStackerCL.vcxproj" -- FAILED.

                And yes the Qt Installation IS set:

                f7fb823d-25cb-4386-bcce-15756f349db9-image.png

                1 Reply Last reply
                0
                • Chris KawaC Offline
                  Chris KawaC Offline
                  Chris Kawa
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  I guess something must've changed. That's the problem with unsupported processes.
                  Well, the easiest, I think, would be to create a basic working Qt project using a wizard and compare the .vcxproj files looking for Qt related stuff.

                  1 Reply Last reply
                  0
                  • PerdrixP Offline
                    PerdrixP Offline
                    Perdrix
                    wrote on last edited by
                    #9

                    I tried that and manually inserted the relevant Qt stanzas into the first project but when I opened the settings in VS the first one refused to recognise the Qt stuff.

                    The second project seems fine but still refuses to build as I posted.

                    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 Extensions
                    • Unsolved