[ Qt 4.3.2 / Windows ]
I wish to pass (small amounts of) information from a "parent" process to spawned "child" processes.
To do this I am attempting to:
QProcess::write() text information from within the "parent" process to a "child" process's standard input.
QTextStream::read() text information from standard input within a "child" process.
To test this idea, I mocked up 2 applications, each with a button ... the "parent" application button action would perform the write, the "child" application button action would perform the read. This was SUCCESSFUL in transferring the information.
Because placing QTextStream::read() in a GUI thread will hang the GUI until there are bytes to read, I moved the "child" application logic to a background thread. NOW it does NOT work ... the "child" process never sees any bytes received.
I am thinking this is what is happening: Only a GUI thread can see standard input.
Am I correct? or should I keep looking for am implementation error on my part. (I have been looking and debugging a lot to arrive at this conclusion.)
I can supply code, but first I thought perhaps someone would know if my approach was even valid to pursue.
Thank y'all for any/all feedback.
Bookmarks