[英]qDebug() doesn't print anything
I try to use Qt with CLion.我尝试将 Qt 与 CLion 一起使用。 My problem is that qDebug() doesn't print anything, but qInfo(), qWarning(), qCritical() and qFatal() works well.我的问题是 qDebug() 不打印任何东西,但 qInfo()、qWarning()、qCritical() 和 qFatal() 运行良好。 Here is my example code:这是我的示例代码:
#include <QCoreApplication>
#include <QDebug>
int main(int argc, char *argv[]) {
QCoreApplication a(argc, argv);
qDebug() << "This will not appear";
qInfo() << "This will appear";
qWarning() << "This will appear too";
qCritical() << "This will appear too";
return a.exec();
}
Specs:眼镜:
Fixed by editing the ~/.config/QtProject/qtlogging.ini file as follows : 通过编辑〜/ .config / QtProject / qtlogging.ini文件来修复此问题,如下所示:
[Rules]
*.debug=true
Try to enter ctrl+shift+alt+/
-> Registry
and tick the run.processes.with.pty
.尝试输入ctrl+shift+alt+/
-> Registry
并勾选run.processes.with.pty
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.