February 1, 2012

Tom_as Tom_as
Lab Rat
1 posts

QProcess freezen



I work in Qt program to control running processes. Unfortunately this kind of process program freezes.

  1. p_control_stunnel = new QProcess (this);
  2.     p_control_stunnel->execute("cmd", QStringList() << "tasklist | find  \"stunnel.exe\"");

I also tried this:

  1. p_control_stunnel = new QProcess (this);
  2.     p_control_stunnel->start("tasklist /v /fo csv | find  \"stunnel.exe\" ");

Unfortunately, as soon as the program runs the entire freezes. debugger did not help.

Please help

1 reply

February 1, 2012

broadpeak broadpeak
Lab Rat
309 posts

The problem is the pipe!
Instead, you have to run tasklist as one process and pass the resulting data to another process running the find stunnel.exe.

  ‹‹ [SOLVED] Save a QTableView as an image      QLabel::setText() from a secondary thread ››

You must log in to post a reply. Not a member yet? Register here!