• 7492阅读
  • 5回复

请问qDebug() [复制链接]

上一主题 下一主题
离线menglige
 

只看楼主 正序阅读 楼主  发表于: 2006-12-15
请问qDebug()函数是做什么的???
谢谢!
[ 此贴被XChinux在2006-12-19 19:23重新编辑 ]
离线oscarboycn

只看该作者 5楼 发表于: 2011-04-11
qDebug() << (你需要打印在输出栏的变量等等)
http://www.21ic.com
http://bbs.eetop.cn
http://www.eetop.cn/
http://www.eet-china.com/
http://www.netyi.net/
http://www.pcbbbs.com/
http://www.pcbtech.net/
离线jetcai1900
只看该作者 4楼 发表于: 2011-03-25
我也没看懂
离线浪漫天使
只看该作者 3楼 发表于: 2006-12-18
See also qInstallMsgHandler(), and Debugging Techniques.
离线menglige

只看该作者 2楼 发表于: 2006-12-18
看不懂,我在QT帮助里也找到这个,不过没看明白。
离线jing_zisu
只看该作者 1楼 发表于: 2006-12-15
void qDebug ( const char * msg, ... )
Calls the message handler with the debug message msg. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger. This function does nothing if QT_NO_DEBUG_OUTPUT was defined during compilation.
If you pass the function a format string and a list of arguments, it works in similar way to the C printf() function.
Example:
  qDebug("Items in list: %d", myList.size());
If you include <QtDebug>, a more convenient syntax is also available:
  qDebug() << "Brush:" << myQBrush << "Other value:" << i;
This syntax automatically puts a single space between each item, and outputs a newline at the end. It supports many C++ and Qt types.
Warning: The internal buffer is limited to 8192 bytes, including the '\0'-terminator.
Warning: Passing (const char *)0 as argument to qDebug might lead to crashes on certain platforms due to the platform's printf() implementation.
See also qWarning(), qCritical(), qFatal(), qInstallMsgHandler(), and Debugging Techniques.
快速回复
限100 字节
 
上一个 下一个