Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. I have an issue after updating Qt from 5.14 to 6.3.0-rc in the compiler
Forum Updated to NodeBB v4.3 + New Features

I have an issue after updating Qt from 5.14 to 6.3.0-rc in the compiler

Scheduled Pinned Locked Moved Unsolved Qt 6
5 Posts 3 Posters 1.1k 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.
  • K Offline
    K Offline
    Kokoy
    wrote on last edited by
    #1

    The compiler used originaly was MSVC 2017-64 bit, the one used in Qt is MSVC 2019-64 bit. This "migration" has produced numerous errors that I honestly don't understand where they're coming from or what triggered them.
    d36ace9a-273c-48af-880b-d233f823a805-image.png
    889e67a6-af28-4021-b374-a72b38fa5d91-image.png

    Thing is I don't know if I did something wrong when upgrading or if there is something missing. So what does someone typically do when they have a project and want to update Qt to a higher version to have access to the latest tools? I mean these errors weren't present before so what exactly triggered them?

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

      A lot of those functions were deprecated in Qt5 and removed in Qt6. For the rest - add the appropriate includes.
      See e.g. TextColorRole or qsrand().

      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
      • K Offline
        K Offline
        Kokoy
        wrote on last edited by
        #3

        So basically I have to replace obsolete functions associated with the the corresponding classes like QStribg with the new ones that were made for Qt 6, correct?

        Christian EhrlicherC 1 Reply Last reply
        0
        • K Kokoy

          So basically I have to replace obsolete functions associated with the the corresponding classes like QStribg with the new ones that were made for Qt 6, correct?

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Kokoy said in I have an issue after updating Qt from 5.14 to 6.3.0-rc in the compiler:

          like QStribg with the new ones that were made for Qt 6, correct?

          I don't know what QStrigb is but yes - replace the deprecated functions with the correct ones.
          You should have done this before upgrading to Qt6 though - Qt5.15 issued a warning for every deprecated function.

          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
          • kkoehneK Offline
            kkoehneK Offline
            kkoehne
            Moderators
            wrote on last edited by
            #5

            For the recommended steps, see also the Porting to Qt 6 Guide. Most people report that the porting effort was small, but that of course depends a lot on your code base ...

            Feel free to reach out here though if you have issues with specific cases!

            Director R&D, The Qt Company

            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