I am trying to suspend a Qprocess and thought about using a function linked to a toolButton that toggles
if (pause)
calcProcess->waitForBytesWritten(-1);
else
{
char buf[8];
buf[0]='\0';
calcProcess->write(buf, 8);
}
if (pause)
calcProcess->waitForBytesWritten(-1);
else
{
char buf[8];
buf[0]='\0';
calcProcess->write(buf, 8);
}
To copy to clipboard, switch view to plain text mode
I hoped waitForBytesWritten might suspend the Qproces until I write some bytes to it. The proces doesn't take any writing BTW, it only emits character.
Is there a way to do this?
I could implement the proces in a QThread but suspening the thread would not suspend the process, or would it?
Bookmarks