How to print to console when using Qt

前端 未结 12 1810
执笔经年
执笔经年 2020-11-29 15:59

I\'m using Qt4 and C++ for making some programs in computer graphics. I need to be able to print some variables in my console at run-time, not debugging, but cout

12条回答
  •  感动是毒
    2020-11-29 16:27

    I found this most useful:

    #include 
    
    QTextStream out(stdout);
    foreach(QString x, strings)
        out << x << endl;
    

提交回复
热议问题