qDebug()不会打印任何内容

Hel*_*llo -1 c++ qt qdebug clion

我尝试将Qt与CLion一起使用.我的问题是qDebug()不打印任何东西,但qInfo(),qWarning(),qCritical()和qFatal()运行良好.这是我的示例代码:

#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();
}
Run Code Online (Sandbox Code Playgroud)

眼镜 :

  • Qt:5.5.1
  • 海湾合作委员会:5.3.1(64位)
  • CMake:3.3.2
  • 克里昂:1.2.2

Hel*_*llo 6

通过编辑〜/ .config/QtProject/qtlogging.ini文件修复如下:

[Rules]
*.debug=true
Run Code Online (Sandbox Code Playgroud)

相关的Bugzilla条目