Hi,
why this code doesn't work ???

Qt Code:
  1. QStringList arguments;
  2. arguments << "-c" << "who|cut -d' ' -f1|sort -u";
  3. QProcess *exec;
  4. exec =new QProcess(this);
  5. exec->start("/bin/sh", arguments);
  6. ui->label->setText(exec->readLine(10));
To copy to clipboard, switch view to plain text mode