http://qiusuoge.com/11410.html
方法是检查QT_NO_DEBUG 这个宏。
示例代码:
#ifdef QT_NO_DEBUG
qDebug() << "release mode";
#else
qDebug() << "debug mode";
#endif
本文介绍了一种通过检查QT_NO_DEBUG宏来判断Qt应用程序运行模式的方法。使用预处理器指令来区分debug模式与release模式,并在不同的模式下输出相应的调试信息。
http://qiusuoge.com/11410.html
方法是检查QT_NO_DEBUG 这个宏。
示例代码:
#ifdef QT_NO_DEBUG
qDebug() << "release mode";
#else
qDebug() << "debug mode";
#endif
1842
1254
380

被折叠的 条评论
为什么被折叠?