In this little program why doesn't in wait for input?
Qt Code:
  1. #include <QtCore>
  2.  
  3. int main(int argc, char *argv[])
  4. {
  5. QTextStream in(stdin, QIODevice::ReadOnly);
  6. QTextStream out(stdout, QIODevice::WriteOnly);
  7.  
  8. QString str;
  9. out << "Enter something: ";
  10. in << str;
  11. out << "hello " << str << "\n";
  12.  
  13. return 0;
  14. }
To copy to clipboard, switch view to plain text mode 
When i execute this i get
Qt Code:
  1. Enter something: hello
  2. Press <RETURN> to close this window...
To copy to clipboard, switch view to plain text mode 
So what is going on that i don't understand?