I am trying to use a QTextStream to output to stdout, but nothing happens unless I enter a character. I tried to enable cstdlib, this did not work either.
Note. I tried to remove all links to my stdin QTextStream and the result worked fine.
#include <QTextStream>
QTextStream out(stdout);
out << "Please enter login username and password\n";
QTextStream in(stdin);
out << "username:";
QString username = in.readLine();
out << "password:";
QString password = in.readLine();
source
share