4/30/2015

QT printf

qDebug ("message %d, says: %s",num,str);
qDebug() << "Debug Message";
qDebug messages are removed if "QT_NO_DEBUG_OUTPUT" is defined, so it will be useful than printf.

And refer to other message out methods.

qWarning() << "Warning Message";
qCritical() << "Critical Error Message";
qFatal() << "Fatal Error Message";

Have a good day!





#include < stdio.h>
#include < QDebug>

int main()
{
    printf("stdio.h\n");
    qDebug() << "QDebug.h";
}