Why do you call it every 21 milisecond?

Would not it be better if you do
Qt Code:
  1. connect(yourProcess, SIGNAL(readyReadStandardError()), this, SLOT(readError()));
  2. connect(yourProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(readOutput()));
  3. ...
  4.  
  5. void yourClass::readError()
  6. {
  7. // call readAllStandardError()
  8. }
  9.  
  10. void yourClass::readOutput()
  11. {
  12. // call readAllStandardOutput()
  13. }
To copy to clipboard, switch view to plain text mode