[Qt-interest] Qprocess - determining the state

Ross Driedger ross at earz.ca
Fri Dec 4 14:11:03 CET 2009


On Fri, 04 Dec 2009 01:35:38 -0500, <qt-interest-request at trolltech.com>  
wrote:


> I'm trying to determine the state of a QProcess. Neither of the following
> attempts is correct. The first causes a compile error and the second  
> results in
> a number that is not 0, 1 or 2.
> ProcessState = myProcess->state();
> int x = myProcess->state();
> What have I misunderstood?

As someone else has mentioned, make sure that your QProcess object is  
valid.

Concerning the compile error, you need to give scope to the ProcessState  
symbol:
QProcess::ProcessState x = myProcess->state();

-- 
"Classical music is the kind we keep thinking will turn into a tune. "
Kin Hubbard

Ross Driedger
ross_at_earz.ca



More information about the Qt-interest-old mailing list