使用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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章