[mythtv-users] QT programming question

Nasa nasa01 at comcast.net
Tue Jan 20 19:41:14 UTC 2009


Hi, 

Nasa schrieb: 
> Nasa schrieb: 
>> I have looked extensively at MythMovies (closest thing to what I am 
>> doing)..... 
>>>I think you missed this one from moviesui.cpp: 
>>>if (!proc.waitForStarted()) 
> 
>>>Just as I said, you have to wait for the started signal! 
> 
> 
> Didn't miss that -- it's used to ensure a process is started, not to see 
> if it still running. 
> 
In your code example, this is missing. So do you actually have a 
waitForStarted or not? It's vital, because proc.start() will immediately 
return and your proc.state() compare will fail because at that moment 
the process is NOT YET running. In fact in this moment it is most likely 
in QProcess::Starting state! 

> WaitforFinish is the function to block until the process has stopped -- 
> and no, it doesn't work either... 
>What do you mean with "doesn't work either". Do you try to compare 
>proc.state() with QProcess::Running AFTER proc.waitForFinish()??? That 
>would be perfectly ok, because when waitForFinish returns the process 
>actually already HAS finished and therefore NOT running anymore. It 
>would be QProcess::NotRunning in this case! 

No, I mean it doesn't work if I use the WaitForFinish function instead of the state check. 
ie: instead of the while loop, just use the WaitForFinish(some time) function. 

Greetings 
-Sascha- 
_______________________________________________ 
mythtv-users mailing list 
mythtv-users at mythtv.org 
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20090120/fb078511/attachment.htm>


More information about the mythtv-users mailing list