O'Reilly logo

Qt 5 Blueprints by Symeon Huang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging Qt applications

To debug any Qt application, you need to ensure that you have installed the debug symbols of the Qt libraries. On Windows, they are installed together with release version DLLs. Meanwhile, on Linux, you may need to install debug symbols by the distribution's package manager.

Some developers tend to use a function similar to printf to debug the application. Qt provides four global functions, which are shown in the following table, to print out debug, warnings, and error text:

Function

Usage

qDebug()

This function is used for writing custom debug output.

qWarning()

This function is used for reporting warnings and recoverable errors.

qCritical()

This function is used for writing critical error messages and reporting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required