Hey all,
I have a strange problem with QProcess, I use QProcess and system command "whoami" to get current logged in user.

Qt Code:
  1. /** where "user" is the QLabel"**/
  2. QString whoamiCom = "/usr/bin/whoami"; //i also tried with just "whoami"
  3. QProcess *userproc = new QProcess(this);
  4. userproc->start(whoamiCom);
  5.  
  6. user->setText(userproc->readAllStandardOutput());
  7. /**I also tried using this method:
  8.   QByteArray result = userproc->readAll();
  9. user->setText(result); **/
To copy to clipboard, switch view to plain text mode 

in anyway the program compiles and runs but nothing is parsed on "user" Label.

Please help, thx