Home · Overviews · Reference · Classes codeless banner

ShellProcess Class Reference

The ShellProcess class runs a process. More...

    #include <ShellProcess>

Public Types

Public Functions

Detailed Description

The ShellProcess class runs a process.

The ShellProcess class runs a process via the shell.

Member Type Documentation

enum ShellProcess::ProcessType

This enum specifies the type of communications to use for stdout/stderr.

ShellProcess::Normal0Use pipes for stdout/stderr.
ShellProcess::TTy1Use a virtual TTY for stdout/stderr. Note that if the current process' stdout or stderr is not a TTY a pipe will be used for that stream instead.

Member Function Documentation

ShellProcess::ShellProcess ( const QString & command, const QString & cwd, ProcessType type = Normal, bool echoCommandBeforeOutput = false )

Construct a shell process that will run command in cwd. The type value specifies if pipes or a TTY should be used. The echoCommandBeforeOutput value indicates that the command should be echoed if any output is produced. The command is run immediately and synchronously.

int ShellProcess::exitCode () const

Returns the exit code of the shell.

QByteArray ShellProcess::output () const

Returns the output from the process.

Copyright © 2009 Nokia
Qt Extended - QBuild Maintainer Guide