Posts

Showing posts from April, 2019

Qt - Enabling qDebug messages and Qt Creator

I have been struggling for the past two hours to get qDebug() messages from my Qt 5 application to show up on the 'Application output' pane in Qt Creator IDE on Linux. Finally I found a solution, thanks to a user on Qt IRC channel. To enable log messages in Qt, do the following: Edit ~/.config/QtProject/qtlogging.ini and make sure it has: [Rules] *.debug=true qt.*.debug=false With this, I was getting the messages when I run the application from a terminal. But Qt Creator was not showing the qDebug() messages. To have the messages displayed in Qt Creator, do the following: Qt creator > Tools > Options > Kits, select your kit, find Environment, click change and add: QT_ASSUME_STDERR_HAS_CONSOLE=1 This fixed the problem for me. I thought I should document the full process here as Google wasn't getting me good leads. My environment: Fedora 29 Linux x86-64 Qt 5.11.3 Qt Creator v4.7.2 References: https://bugzilla.redhat.com/show_bug.cgi?id=12272