And ....

QString str;
QTextStream in(stdin);
function outputs ....
in >> str;

not grab nothing...! I am sure ... a method must exist....
$content = file_get_contents("php://input");
qt it must be able to read the stdin or stdout ecc...