how to use obsolete member of class (QMap in my case)
-
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?
-
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?
-
Thank you for your reply!
I am using Qt 6.3. Do you know how I can get a free trial of Qt5? -
@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.
-
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?
-
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.
-
Thank you so much!!! It worked!