给项目添加一个环境变量 QT_ASSUME_STDERR_HAS_CONSOLE=1 参考网址:https://youtrack.jetbrains.com/issue/CPP-24369/Auto-enable-qDebug-console.log-output-to-the-debug-console-for-Qt-projects-on-Windows