Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved How to use Qt with Visual Studio 2017?

    General and Desktop
    8
    15
    76860
    Loading More Posts
    • 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.
    • B
      BAHRAMUDIN ADIL last edited by

      How to configure Qt to support Visual Studio 2017, I have downloaded and installed the latest version of Qt (VS2015) which seems not working with VS 2017. If this version of Qt is not supported VS2017, then the next version when will be released? Thanks!

      mrjj 1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion @BAHRAMUDIN ADIL last edited by mrjj

        @BAHRAMUDIN-ADIL
        Hi you will have to add the kits manually yourself.
        it wont be auto detected. (AFAIK)

        Please see
        https://forum.qt.io/topic/78112/the-visual-studio-2017-is-released-when-qt-msvc2017-version-release/7

        B 1 Reply Last reply Reply Quote 3
        • K
          KeithS last edited by

          Qt 5.8.0 compiles fine with VC++ 2017. Else you can wait for 5.9.0.

          B 1 Reply Last reply Reply Quote 1
          • B
            BAHRAMUDIN ADIL @mrjj last edited by

            @mrjj Thanks for your reply! I have already tested those steps which you suggested, but it was not working. But I don't to uninstall my VS2017 and install VS2015.

            jsulm 1 Reply Last reply Reply Quote 0
            • jsulm
              jsulm Lifetime Qt Champion @BAHRAMUDIN ADIL last edited by

              @BAHRAMUDIN-ADIL What was not working?

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

              1 Reply Last reply Reply Quote 1
              • E
                Eligijus last edited by

                Are you looking for Qt VS2017 addin? If that's the case there's beta version qt-vsaddin-msvc2017-2.1.1-beta-10.03.2017.vsix

                J 1 Reply Last reply Reply Quote 0
                • B
                  BAHRAMUDIN ADIL last edited by

                  @jsulm It is the problem:
                  0_1493992280645_Capture.PNG
                  0_1493992354981_Capture1.PNG
                  0_1493992366086_Capture2.PNG
                  0_1493992371925_Capture3.PNG

                  1 Reply Last reply Reply Quote 0
                  • B
                    BAHRAMUDIN ADIL last edited by

                    @Eligijus No, I want to set the compiler of Qt to MSVC2017 which I have already have on my computer. But is not working, I have tried many ways, the suggested ways on this forum, but no one was solved the problem. But when I tried on another PC which has Visual Studio 2015 installed, it was working well.

                    1 Reply Last reply Reply Quote 0
                    • B
                      BAHRAMUDIN ADIL @KeithS last edited by

                      @KeithS How to work, can you tell me how to setup?

                      1 Reply Last reply Reply Quote 0
                      • SGaist
                        SGaist Lifetime Qt Champion last edited by

                        Hi,

                        IIRC from another post, you have to clone your VS2015 Kit and point it to the VS2017 compiler, etc.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        B 1 Reply Last reply Reply Quote 0
                        • B
                          BAHRAMUDIN ADIL @SGaist last edited by BAHRAMUDIN ADIL

                          @SGaist I really waste my time, but the problem still not solved, why they make it such complex which something impossible???

                          1 Reply Last reply Reply Quote 0
                          • Chris Kawa
                            Chris Kawa Moderators last edited by Chris Kawa

                            The next release, Qt 5.9, is planned for the end of May: Qt 5.9 release.
                            It will contain precompiled binaries for VS2017. For now you can use the ones for VS2015. They are (to some degree) compatible.

                            Using VS2017 Is not impossible nor that complex. Just make a kit for it. Here's a step by step for you:

                            1. Install Visual Studio. Make sure that at least the c++ compiler and Windows SDK components are selected.
                              step 1

                            2. Install Qt 5.8.0 for VS2015. You don't need any other component.
                              step 2

                            3. Open QtCreator, go to Tool->Options->Build&Run. Verify that QtCreator detects Visual Studio 2017 (MSVC 15.0).
                              step 3

                            4. Go to Qt Versions tab. Make sure Qt version you installed is present.
                              step 4

                            5. Go to Kits tab. Make sure the kit for that Qt version is present. QtCreator will complain about compiler missing for this version. That's ok because you don't have VS2015 installed. Ignore it.
                              step 5

                            6. Select the 2015 kit and press "Clone". Select the cloned kit and set it up like this. QtCreator will complain again about incompatible ABIs, but that's ok. The diagnostics don't yet support mixed Qt and VS versions but it will work just fine. Hit "Apply" and close the settings.
                              step 6

                            7. When creating a project select the newly created kit. You can also add/remove/switch kits for your project later, by selecting the "Projects" tab on the left side of QtCreator.
                              step 7

                            8. [OPTIONAL] If you need to debug your app see my other post about setting up the debugger for MSVC: Setting up debugger.

                            B 1 Reply Last reply Reply Quote 12
                            • B
                              BAHRAMUDIN ADIL @Chris Kawa last edited by

                              @Chris-Kawa Thank you for your reply, I will follow the steps you mentioned above, hope it works!!

                              1 Reply Last reply Reply Quote 0
                              • J
                                JackBerman @Eligijus last edited by

                                @Eligijus said in How to use Qt with Visual Studio 2017?:

                                Are you looking for Qt VS2017 addin? If that's the case there's beta version qt-vsaddin-msvc2017-2.1.1-beta-10.03.2017.vsix customwritingz.net

                                During its installation, administrator rights are required, if they are not present, the installation is successful, but the binding may not be complete. This is manifested in this way, xxxx.ui should turn into ui_xxxx.h during compilation, but the corresponding utility does not work and an error occurs. You can try reinstalling the plugin by running the studio as an administrator.

                                Chris Kawa 1 Reply Last reply Reply Quote 0
                                • Chris Kawa
                                  Chris Kawa Moderators @JackBerman last edited by

                                  @JackBerman said in How to use Qt with Visual Studio 2017?:

                                  During its installation, administrator rights are required, if they are not present, the installation is successful, but the binding may not be complete. This is manifested in this way, xxxx.ui should turn into ui_xxxx.h during compilation, but the corresponding utility does not work and an error occurs.

                                  The uic tool that processes .ui files is part of Qt library, which is configured after the extension is already installed, so I don't see how running VS as an administrator could change anything. There's no binding at that point because there's nothing to bind yet.

                                  If you're having issues with the extension could you start a new thread?

                                  1 Reply Last reply Reply Quote 1
                                  • First post
                                    Last post