预编译器
2016-01-06 10:13
337 查看
Q_DECL_OVERRIDE
This macro can be used to declare an overriding virtual function. Use of this markup will allow the compiler to generate an error if the overriding virtual function does not in fact override anything.
It expands to “override” if your compiler supports that C++11 contextual keyword, or to nothing otherwise.
The macro goes at the end of the function, usually after the const, if any:
// generate error if this doesn’t actually override anything:
virtual void MyWidget::paintEvent(QPaintEvent*) Q_DECL_OVERRIDE;
This function was introduced in Qt 5.0.
This macro can be used to declare an overriding virtual function. Use of this markup will allow the compiler to generate an error if the overriding virtual function does not in fact override anything.
It expands to “override” if your compiler supports that C++11 contextual keyword, or to nothing otherwise.
The macro goes at the end of the function, usually after the const, if any:
// generate error if this doesn’t actually override anything:
virtual void MyWidget::paintEvent(QPaintEvent*) Q_DECL_OVERRIDE;
This function was introduced in Qt 5.0.
相关文章推荐
- O2OO是一个汽车故障诊断工具
- hdu1203
- Saltstack远程执行命令(3)
- 文本特征提取方法研究
- 临时
- Android 加密之MD5加密
- Android单元测试研究与实践
- MS SQLSERVER 自增ID列竟然会重复
- oracle中建立job定期运行存储过程总结
- 12月Web服务器份额:Apache与Microsoft均下降
- 深入理解BootStrap -- 导航页(navbar)11
- 23种设计模式
- Python 对Twitter中指定话题的被转载Tweet数量的频谱分析
- 智能PDU 解决方案
- jquery键盘事件全记录
- python 序列类型
- SQL语句优化提高数据库性能
- Spring的maven配置版本不一致问题
- STL之list容器函数用法详解
- 解决eclipse启动时报错Failed to create the Java Virtural Machine.问题的方法