qt printing to terminal

后端 未结 4 1954
深忆病人
深忆病人 2021-01-27 12:09

In my QT application, I want to have it so some real-time information prints in the terminal if I run the application from the terminal.

When I use printf(\"print this\"

4条回答
  •  广开言路
    2021-01-27 12:38

    To write to stdout, you should add this CONFIG += console to your project file config and use cout of printf for your liking. qDebug prints by default to stderr. Check this topic for more info - How to print to console when using Qt

提交回复
热议问题