简体   繁体   中英

How enable deprecated functions in Qt5

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.

您可以在.pro文件中添加以下行:

DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM