还可以使用Q_SIGNAL,Q_EMIT,Q_SLOT避免第三方库的关键字冲突
2024-09-04 23:01:25
You can define the QT_NO_KEYWORDS macro, that disables the “signals” and “slots” macros.
If you use QMake:
CONFIG += no_keywords
If you’re using another build system, do whatever it needs to pass -DQT_NO_KEYWORDS
to the compiler.
Defining QT_NO_KEYWORDS will require you to change occurrences of signals
to Q_SIGNALS
and slots
to Q_SLOTS
in your Qt code.
If you cannot change all the Qt code, e.g. because you're using third-party libraries not being "keyword-clean", you could try to undefine "signals" locally before including cdk.h:
#undef signals
#include <cdk.h>
I'd recommend to use no_keywords though if possible, as it is less tedious and error-prone.
http://stackoverflow.com/questions/22188432/cdk-collides-with-qt-signals
最新文章
- 了不起的 nodejs-TwitterWeb 案例 bug 解决
- 今天再给大家带点html5前端开发的干货模板“text/tpl”怎么用 script template怎么用
- Struts框架——(二)Struts原理with登录实例
- ES6 import export
- 线程池pool
- 六个创建模式之简单工厂模式(Simple Factory Pattern)
- C#中种常用的计时器
- 传微软欲收购Xamarin:未来有望通过VS开发iOS和Android应用?
- ASP.NET Excel数据导入数据库
- SQLLoader7(只导入数据文件的其中几行记录)
- 关于mysql表中有大文本limit慢的优化
- LaTeX 各种命令,符号
- JS基础四
- Linux最小系统移植之早期打印CONFIG_EARLY_PRINTK
- js-模块化(三大模块化规范)
- ZOJ3967 : Card Game
- Git命令git update-index --assume-unchanged,忽略不想提交的文件(忽略跟踪)
- 关于form表单排版的技巧
- 大数据自学3-Windows客户端DbVisualizer/SQuirreL配置连接hive
- Django Rest Framework源码剖析(一)-----认证
热门文章
- NOIP模拟 乘积 - 状压dp + 分组背包
- 一起学Python:字典介绍
- 排序 —— 希尔排序(Shell sort)
- 零碎笔记之ServiceManager
- 看看是不是你想要的:pycharm永久激活!!!
- [Cordova+Sencha Touch] 移动开发1 sencha 2.4.0 + 在 安卓2.3.6上使用报错 - has no method &#39;bind&#39;
- Arcgis api for javascript学习笔记(4.6版本) - 二维MapView中的FeatureLayer显示标注
- win7(64位)彻底卸载mysql,重装不再烦恼
- 机器审核图片学习(1)pornDetector
- 51系列小型操作系统精髓 简单实现6 C语言版待改进