Does anyone know an officially supported way to include debug-build only code in Qt? For example:
#ifdef QT_DEBUG // do something #endif
Basica
Qt defines QT_NO_DEBUG for release builds. Otherwise QT_DEBUG is defined.
QT_NO_DEBUG
QT_DEBUG
Of course you are free to specify any DEFINES in your .pro files and scope them for either debug or release.
DEFINES
debug
release