Extending Qt Creator Manual | ConsoleProcess

Extending Qt Creator Manual 4.6.2

# ConsoleProcess Class

(Utils::ConsoleProcess)

- List of all members, including inherited members

## Public Types

enum | Mode { Run, Debug, Suspend }

## Public Functions

| ConsoleProcess(QObject *parent = 0)
| ~ConsoleProcess()
qint64 | applicationMainThreadID() const
qint64 | applicationPID() const
Environment | environment() const
QProcess::ProcessError | error() const
QString | errorString() const
int | exitCode() const
QProcess::ExitStatus | exitStatus() const
bool | isRunning() const
void | killProcess()
void | killStub()
Mode | mode() const
void | setEnvironment(const Environment &env)
void | setMode(Mode m)
void | setSettings(QSettings *)
void | setWorkingDirectory(const QString &dir)
bool | start(const QString &program, const QString &args)
QString | workingDirectory() const

## Public Slots

void | stop()

## Signals

void | error(QProcess::ProcessError error)
void | processError(const QString &errorString)
void | processStarted()
void | processStopped(int, QProcess::ExitStatus)
void | stubStarted()
void | stubStopped()

## Static Public Members

QStringList | availableTerminalEmulators()
QString | createWinCommandline(const QString &program, const QStringList &args)
QString | createWinCommandline(const QString &program, const QString &args)
QString | defaultTerminalEmulator()
QStringList | fixWinEnvironment(const QStringList &env)
void | setTerminalEmulator(QSettings *, const QString &)
bool | startTerminalEmulator(QSettings *settings, const QString &workingDir)
QString | terminalEmulator(const QSettings *, bool = true)

## Member Type Documentation

### enum ConsoleProcess::Mode

## Member Function Documentation

### ConsoleProcess::ConsoleProcess(QObject *parent = 0)

Default constructs an instance of ConsoleProcess.

### ConsoleProcess::~ConsoleProcess()

Destroys the instance of ConsoleProcess.

### qint64 ConsoleProcess::applicationMainThreadID() const

### qint64 ConsoleProcess::applicationPID() const

### `[static]` QStringList ConsoleProcess::availableTerminalEmulators()

### `[static]` QString ConsoleProcess::createWinCommandline(const QString &program, const QStringList &args)

### `[static]` QString ConsoleProcess::createWinCommandline(const QString &program, const QString &args)

### `[static]` QString ConsoleProcess::defaultTerminalEmulator()

### Environment ConsoleProcess::environment() const

See also setEnvironment().

### QProcess::ProcessError ConsoleProcess::error() const

### `[signal]` void ConsoleProcess::error(QProcess::ProcessError error)

Note: Signal error is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:

      connect(consoleProcess, QOverload<QProcess::ProcessError>::of(&ConsoleProcess::error),
          [=](QProcess::ProcessError error){ /* ... */ });

### QString ConsoleProcess::errorString() const

### int ConsoleProcess::exitCode() const

### QProcess::ExitStatus ConsoleProcess::exitStatus() const

### `[static]` QStringList ConsoleProcess::fixWinEnvironment(const QStringList &env)

### bool ConsoleProcess::isRunning() const

### void ConsoleProcess::killProcess()

### void ConsoleProcess::killStub()

### Mode ConsoleProcess::mode() const

See also setMode().

### `[signal]` void ConsoleProcess::processError(const QString &errorString)

### `[signal]` void ConsoleProcess::processStarted()

### `[signal]` void ConsoleProcess::processStopped(int, QProcess::ExitStatus)

### void ConsoleProcess::setEnvironment(const Environment &env)

See also environment().

### void ConsoleProcess::setMode(Mode m)

See also mode().

### void ConsoleProcess::setSettings(QSettings *)

### `[static]` void ConsoleProcess::setTerminalEmulator(QSettings *, const QString &)

See also terminalEmulator().

### void ConsoleProcess::setWorkingDirectory(const QString &dir)

See also workingDirectory().

### bool ConsoleProcess::start(const QString &program, const QString &args)

### `[static]` bool ConsoleProcess::startTerminalEmulator(QSettings *settings, const QString &workingDir)

### `[slot]` void ConsoleProcess::stop()

### `[signal]` void ConsoleProcess::stubStarted()

### `[signal]` void ConsoleProcess::stubStopped()

### `[static]` QString ConsoleProcess::terminalEmulator(const QSettings *, bool = true)

See also setTerminalEmulator().

### QString ConsoleProcess::workingDirectory() const

See also setWorkingDirectory().