I have problem with QProcess. My code:
Qt Code:
  1. class Mencoder : public QObject
  2. {
  3. ...
  4. private:
  5. QProcess *proc;
  6. };
  7. ..
  8.  
  9. Mencoder::Mencoder( .../* some parameters */, QObject *parent ) : QObject( parent )
  10. {
  11. proc = new QProcess( this );
  12. connect( proc, SIGNAL( readyReadStandardOutput() ), this, SLOT( update() ) );
  13. connect( proc, SIGNAL( finished(..) ), this, SLOT( on_finished(..) ) );
  14. ...
  15. proc->start( "mencoder", arg );
  16. }
  17.  
  18. void Mencoder::update()
  19. {
  20. ......
  21. emit newInfo( .... /*some new data for main apps*/ );
  22. }
  23.  
  24. void Mencoder::on_finished(..)
  25. {
  26. ..
  27. proc->close();
  28. deleteLater();
  29. }
To copy to clipboard, switch view to plain text mode 

Everything works, but i have problem with cpu usage. From system info i have this:
%CPU COMMAND
32 mencoder
40 myApps
23 xorg
Wher's the problem?