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.