On Wednesday 24 March 2004 10:34 am, Angus Leeming wrote: > Kuba Ober wrote: > > Tell you what. The amount of time this discussion has taken so far I > > presume is comparable to what it takes to use the working and tested > > QProcess. And this will work on Windows (for those who compile LyX > > with Qt/Win) as well. > > > > What's so bad about QProcess? > > You really want to know? > > (In truth I know nothing about QProcess. I did investigate > QEventLoop though.) > > 1. QEventLoop is specific to Qt >= 3.1. > 2. Qt < 3.1 must use a timer with timeout set to 0. > Together these two mean a lot of nasty #ifdef nastiness. > See the sample code I posted here:
Forget the event loop. QProcess *already* puts relevant functionality into the event loop for you. It's all there. You get signals (i.e. runtime-bound function calls) for stdout/stderr data and process termination. Can't be any simpler, really. Cheers, Kuba