使用Qt时如何打印到控制台 - How to print to console when using Qt

问题:

I'm using Qt4 and C++ for making some programs in computer graphics.我正在使用 Qt4 和 C++ 来制作一些计算机图形程序。 I need to be able to print some variables in my console at run-time, not debugging, but cout doesn't seem to work even if I add the libraries.我需要能够在运行时在我的控制台中打印一些变量,而不是调试,但是即使我添加了库, cout似乎也不起作用。 Is there a way to do this?有没有办法做到这一点?


解决方案:

参考一: https://en.stackoom.com/question/GIx7
参考二: https://stackoom.com/question/GIx7
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章