QProcess signal/slot not working after Ctrl+Z and bg

39 views Asked by At

I have a Qt GUI application that runs on Linux.

It is a QApplication that uses QProcess to do some work when a button is clicked.

The finished signal on the QProcess is connected to a slot:

connect(workerProcess, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(onWorkerFinished(int,QProcess::ExitStatus)));

Things work fine when I run the program normally on command line:

% myProgram
or run it in the background
% myProgram&

However, if I run it normally, then suspend it using Ctrl+Z and put it in the background, things stop working:

% myprogram
Ctrl+Z
bg

The GUI still responds. But when I click the button, it seems to start the QProcess, but the slot connected to the finished() signal never gets called.

Does suspending the application and putting it in the background somehow mess the signal/slot connection?

0

There are 0 answers