我试图利用QTextStream来进行产出,以便停下来,但除非我具有特性,否则不会发生任何事情。 我已尝试包括校正,但都没有工作。
Note: I tried removing all references to my stdin QTextStream and output worked fine.
#include <QTextStream>
QTextStream out(stdout);
out << "Please enter login username and password
";
QTextStream in(stdin);
out << "username:";
QString username = in.readLine();
out << "password:";
QString password = in.readLine();