just #include <QDebug> and then use qDebug instead of cout , for example
qDebug() << "you just clicked ok";
also it works
#include <QTextStream> QTextStream out(stdout); out << "\nHello World!\n";
adding CONFIG += console to the .pro file did not help me. I wonder why?
I just discovered that I have to add "endl;" for cout work like
cout << "print this" << endl;
David okwii
source share