Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How enable deprecated functions in Qt5

Tags:

c++

qt

I want to port a Qt4 program to Qt5 and some functions are not defined (such as QHeaderView::setMoveable), but I see in the qheaderview.h file that with some magic defines (QT_DEPRECATED_SINCE) it should be possible to reenable them. What do I have to do in order to let QHeaderView::setMovable reappear? I do not want to rewrite my code if there is a way like that.

like image 966
Leo Avatar asked Sep 02 '14 12:09

Leo


1 Answers

You can add to your .pro file the following line:

DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
like image 60
trivelt Avatar answered Sep 27 '22 18:09

trivelt