qDebug not displaying anything

Lukasz Czerwinski picture Lukasz Czerwinski · Oct 9, 2012 · Viewed 18.2k times · Source

Often when I need to debug something it's easier to print something using qDebug() instead of debugging step-by-step using a debugger. The problem is that from time to time the output of qDebug() isn't displayed at all! The same with qWarning and qCritical. What's strange, it only occurs when running the project normally (Ctrl+R), while when debugging (F5) the output shows up.

Answer

Lukasz Czerwinski picture Lukasz Czerwinski · Oct 9, 2012

The solution is simple: add CONFIG += console to your .pro file and rebuild the whole project.