首页 > 其他 > 详细

How enable deprecated functions in Qt5

时间:2019-02-15 21:21:52      阅读:446      评论:0      收藏:0      [点我收藏+]

问题:Qt5中如何启用以 QT_DEPRECATED_SINCE标识的已经废弃/过时的方法?

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.

答:You can add to your ***.pro file the following line,即在工程文件中添加如下的定义:

DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0

 

How enable deprecated functions in Qt5

原文:https://www.cnblogs.com/rainbow70626/p/10385599.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!