Logo Search packages:      
Sourcecode: qt4-x11 version File versions

bool QProcess::waitForStarted ( int  msecs = 30000  ) 

Blocks until the process has started and the started() signal has been emitted, or until msecs milliseconds have passed.

Returns true if the process was started successfully; otherwise returns false (if the operation timed out or if an error occurred).

This function can operate without an event loop. It is useful when writing non-GUI applications and when performing I/O operations in a non-GUI thread.

Calling this function from the main (GUI) thread might cause your user interface to freeze.
If msecs is -1, this function will not time out.

See also:
started(), waitForReadyRead(), waitForBytesWritten(), waitForFinished()

Definition at line 1227 of file qprocess.cpp.

References setProcessState(), and started().

Referenced by waitForBytesWritten(), and waitForFinished().

    if (d->processState == QProcess::Starting) {
        if (!d->waitForStarted(msecs))
            return false;
        emit started();
    return d->processState == QProcess::Running;

Generated by  Doxygen 1.6.0   Back to index