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. how to use obsolete member of class (QMap in my case)
Forum Updated to NodeBB v4.3 + New Features

how to use obsolete member of class (QMap in my case)

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 597 Views 2 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.
  • B Offline
    B Offline
    beginner-1
    wrote on last edited by
    #1

    I want to compile an old code and I have some issues:

    I use a member of a class (insertMulti of QMap) that is obsolete according to the documentation (https://doc.qt.io/qt-5/qmap-obsolete.html)

    It's supposed to be available to ensure compatibility with old codes, but it's not.

    Do you know how I can include it?

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

      Obsolete members are just marked as such in source code so the compiler can issue a warning. There's nothing extra you need to do to use them. They are still there.

      Keep in mind though that features marked obsolete in Qt5 were removed entirely in Qt6. Which version do you use?

      B 1 Reply Last reply
      3
      • Chris KawaC Chris Kawa

        Obsolete members are just marked as such in source code so the compiler can issue a warning. There's nothing extra you need to do to use them. They are still there.

        Keep in mind though that features marked obsolete in Qt5 were removed entirely in Qt6. Which version do you use?

        B Offline
        B Offline
        beginner-1
        wrote on last edited by
        #3

        @Chris-Kawa

        Thank you for your reply!
        I am using Qt 6.3. Do you know how I can get a free trial of Qt5?

        Chris KawaC 1 Reply Last reply
        0
        • B beginner-1

          @Chris-Kawa

          Thank you for your reply!
          I am using Qt 6.3. Do you know how I can get a free trial of Qt5?

          Chris KawaC Offline
          Chris KawaC Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @beginner-1 said:

          Do you know how I can get a free trial of Qt5?

          You don't need a trial. Qt has a free open source version. The easiest way to get it is via online installer.

          1 Reply Last reply
          2
          • B Offline
            B Offline
            beginner-1
            wrote on last edited by
            #5

            @Chris-Kawa

            I used both a 5.0.3 and a 4.15.2 from (https://download.qt.io/official_releases/qtcreator/)
            but when I try to build, I still get the error: 'QCPDataMap' {aka'classQMap<double,QCPData'} has no member named 'insertMulti'

            I also get an error: "QDesktopWidget: No such file or directory"

            Do you have any suggestions?

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

              Qt is not QtCreator... @Chris-Kawa said you have to downgrade Qt to 5.15.x to compile your code or replace the removed functions.

              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
              2
              • B Offline
                B Offline
                beginner-1
                wrote on last edited by
                #7

                Thank you so much!!! It worked!

                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