Qt qDebug()在Windows shell中不起作用

fly*_*yer 5 printf qt console-application qdebug

我在屏幕上使用qDebug()Qt框架printf.当我从Qt Creator运行应用程序时它工作得很好,但是当我尝试从Windows执行它时cmd它什么也没显示.为什么会这样?

tro*_*ane 10

你必须添加

CONFIG += console
Run Code Online (Sandbox Code Playgroud)

到您的项目.pro文件,不要忘记清理和构建(重建)您的项目.

  • 谢谢.有用.我想我以前都试过这个,但没有清理并构建完整的项目. (2认同)