Hi
I am having trouble getting qDebug() output displayed in the 'application output' tab in Qt Creator.
I am aware of the need to explicitly enable Qt message logging and have the following in my ~/.config/QtProject/qtlogging.ini:
[Rules] *.debug=true qt.*.debug=false
But even with this, Qt Creator does not show any qDebug() messages. I am getting these messages if I run the application from Konsole. Just not in Qt creator.
Any Idea on what can be done to fix this?
I'm on Fedora 29, Qt 5.11.3, Qt Creator v4.7.2.
Thanks and regards,
Syam
qtlogging.ini only affects qCDebug (and friends), not qDebug, see https://doc.qt.io/qt-5/qloggingcategory.html
On Sat, Apr 13, 2019 at 8:25 AM Syam Krishnan syamcr@gmail.com wrote:
Hi
I am having trouble getting qDebug() output displayed in the 'application output' tab in Qt Creator.
I am aware of the need to explicitly enable Qt message logging and have the following in my ~/.config/QtProject/qtlogging.ini:
[Rules] *.debug=true qt.*.debug=false
But even with this, Qt Creator does not show any qDebug() messages. I am getting these messages if I run the application from Konsole. Just not in Qt creator.
Any Idea on what can be done to fix this?
I'm on Fedora 29, Qt 5.11.3, Qt Creator v4.7.2.
Thanks and regards,
Syam _______________________________________________ kde mailing list -- kde@lists.fedoraproject.org To unsubscribe send an email to kde-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kde@lists.fedoraproject.org
You need to set QT_ASSUME_STDERR_HAS_CONSOLE=1 environment variable. This is needed because Qt in Fedora is configured that way that when application is run not from console (e.g. from applications launcher) it will send QDebug output to journald instead of stderr. However for some reason when app is run from Qt Creator it doesn't recognise Qt Creator's "application output" redirection plugin as console so this variable is needed. You can set it in environment settings in Qt Creator's "Kits" settings.
On 5/1/19 5:03 AM, Alexey Rochev wrote:
You need to set QT_ASSUME_STDERR_HAS_CONSOLE=1 environment variable. This is needed because Qt in Fedora is configured that way that when application is run not from console (e.g. from applications launcher) it will send QDebug output to journald instead of stderr. However for some reason when app is run from Qt Creator it doesn't recognise Qt Creator's "application output" redirection plugin as console so this variable is needed. You can set it in environment settings in Qt Creator's "Kits" settings.
Yes, thank you. I sought help in Qt IRC channel and someone there gave me the same info. I was able to fix it by following these same instructions.
I have documented it here: http://solidsmoke.blogspot.com/2019/04/qt-enabling-qdebug-messages-and-qt.ht...
These things sure cause some hurdles for Qt development on Fedora.
Thanks,
Syam
On Tue, 2019-04-30 at 23:33 +0000, Alexey Rochev wrote:
You need to set QT_ASSUME_STDERR_HAS_CONSOLE=1 environment variable. This is needed because Qt in Fedora is configured that way that when application is run not from console (e.g. from applications launcher) it will send QDebug output to journald instead of stderr. However for some reason when app is run from Qt Creator it doesn't recognise Qt Creator's "application output" redirection plugin as console so this variable is needed. You can set it in environment settings in Qt Creator's "Kits" settings.
When replying via HyperKitty, remember that most of us still read this via the mailing list, so please include some context in line with long- standing practice. HyperKitty unfortunately doesn't do thisautomatically.
poc