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. Is it possible to build QT 6 with MSVC2017
Forum Updated to NodeBB v4.3 + New Features

Is it possible to build QT 6 with MSVC2017

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 3 Posters 580 Views 1 Watching
  • 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.
  • R Offline
    R Offline
    Rajnish
    wrote on last edited by
    #1

    Hi,
    I am currently migrating our code from QT5.15 to QT 6. And I am having a lot of errors in qnamespace.h after upgrading to QT 6.0. Some of the errors are like :
    ShiftModifier is not a member of QT
    ControlModifier is not a member of QT
    AltModifier is not a member of QT
    staticMetaObject: undeclared identifier
    qt_getEnumMetaObject: redefinition; previous definition was function
    sytnax errors, etc

    JKSHJ 1 Reply Last reply
    0
    • R Rajnish

      Hi,
      I am currently migrating our code from QT5.15 to QT 6. And I am having a lot of errors in qnamespace.h after upgrading to QT 6.0. Some of the errors are like :
      ShiftModifier is not a member of QT
      ControlModifier is not a member of QT
      AltModifier is not a member of QT
      staticMetaObject: undeclared identifier
      qt_getEnumMetaObject: redefinition; previous definition was function
      sytnax errors, etc

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      @Rajnish said in Is it possible to build QT 6 with MSVC2017:

      I am currently migrating our code from QT5.15 to QT 6. And I am having a lot of errors in qnamespace.h after upgrading to QT 6.0.

      First, eliminate all deprecation warnings in Qt 5.15 before trying to port to Qt 6.

      See https://doc.qt.io/qt-6/portingguide.html

      ShiftModifier is not a member of QT

      ShiftModifier is not a menber of QT, but it is definitely a member of Qt: https://doc.qt.io/qt-6/qt.html#KeyboardModifier-enum

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      1
      • R Offline
        R Offline
        Rajnish
        wrote on last edited by
        #3

        Hi JKSH,
        Can you please suggest me how to deprecate these warnings you are suggesting.
        Thanks

        JKSHJ 1 Reply Last reply
        0
        • R Rajnish

          Hi JKSH,
          Can you please suggest me how to deprecate these warnings you are suggesting.
          Thanks

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @Rajnish said in Is it possible to build QT 6 with MSVC2017:

          Can you please suggest me how to deprecate these warnings you are suggesting.

          See the link I gave you

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Rajnish
            wrote on last edited by
            #5

            Hi,
            I have used the macro "QT_DISABLE_DEPRECATED_BEFORE" but errors are still persistent. Even set it to "=0x000000" in the cmake file.

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Rajnish
              wrote on last edited by
              #6

              Also I had the same error as mentioned in QTBUG-88556. But unable to find any resolution use it

              JKSHJ 1 Reply Last reply
              0
              • R Rajnish

                Also I had the same error as mentioned in QTBUG-88556. But unable to find any resolution use it

                JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on last edited by
                #7

                @Rajnish said in Is it possible to build QT 6 with MSVC2017:

                I have used the macro "QT_DISABLE_DEPRECATED_BEFORE" but errors are still persistent. Even set it to "=0x000000" in the cmake file.

                You are supposed to build in Qt 5.15 (not Qt 6). If you see any deprecation warnings, fix them.

                You must make sure that your project builds OK in Qt 5.15 even when you have set QT_DISABLE_DEPRECATED_BEFORE=0x050F00. After you achieve this, then you are ready to port to Qt 6.

                Also I had the same error as mentioned in QTBUG-88556. But unable to find any resolution use it

                Actually, QTBUG-88556 does have a resolution: Switch from the MSVC 2017 compiler to the MSVC 2019 compiler. Does this answer your original question?

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                2
                • Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  The supported platforms page clearly states that you need MSVC2019.

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  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