Up until now, I output everything using qDebug().noquote()
. This is easy because it just requires a simple #import <QDebug>
Now I need everything to output to stdout
, but I don't know how to do it easily. This how I was taught:
QTextStream cout(stdout, QIODevice::WriteOnly);
However, creating a new object is a tad bit more cumbersome than a simple #import <QDebug>
. What is the good/least cumbersome way to handle stdout
in qt?