How to use deprecated functions in Qt5
-
Hi,
I am trying to build my application with Qt5, while keeping the source compatible to Qt4. I already have an idea how to do this in the project file and how to deal with the includes.
Now I would like to use deprecated functions like QHeaderView::setResizeMode().
I have tried the "QT_DISABLE_DEPRECATED_BEFORE":http://qt-project.org/doc/qt-5.0/qtcore/qtglobal.html#QT_DISABLE_DEPRECATED_BEFORE macro but I still cannot use the deprecated functions.
.pro file:
@QT_DISABLE_DEPRECATED_BEFORE=0x04000000@Is it possible to call deprecated functions, or would I have to make a custom build to do this?
-
Did you try
@
QT_DISABLE_DEPRECATED_BEFORE=0x000000
@ -
@
QT_DISABLE_DEPRECATED_BEFORE=0x04000000 ##Don't work, it's larger than 0x050000
QT_DISABLE_DEPRECATED_BEFORE=0x040000 ##Use this!!
@ -
thanks for the answers, I now tried
@
QT_DISABLE_DEPRECATED_BEFORE=0x040000
@and
@
QT_DISABLE_DEPRECATED_BEFORE=0x000000@but none of it works.