QProcess

#include <QtCore/QProcess>

More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QProcess


Overview

Inheritance

QIODevice
QProcess

Public Types Index

enum ExitStatus

NormalExit, CrashExit

enum ProcessChannel

StandardOutput, StandardError

enum ProcessChannelMode

SeparateChannels, MergedChannels, ForwardedChannels

enum ProcessError

FailedToStart, Crashed, Timedout, ReadError, WriteError, UnknownError

enum ProcessState

NotRunning, Starting, Running

enum OpenModeFlag

NotOpen 0x0000, ReadOnly 0x0001, WriteOnly 0x0002, ReadWrite ReadOnly | WriteOnly, Append 0x0004, Truncate 0x0008, Text 0x0010, Unbuffered 0x0020

Public Functions Index

QProcess (QObject *parent=0)
virtual ~QProcess ()
virtual boolatEnd () const
virtual qint64bytesAvailable () const
virtual qint64bytesToWrite () const
virtual boolcanReadLine () const
virtual voidclose ()
voidcloseReadChannel (ProcessChannel channel)
voidcloseWriteChannel ()
QStringListenvironment () const
QProcess::ProcessErrorerror () const
intexitCode () const
QProcess::ExitStatusexitStatus () const
virtual boolisSequential () const
Q_PIDpid () const
ProcessChannelModeprocessChannelMode () const
QProcessEnvironmentprocessEnvironment () const
QByteArrayreadAllStandardError ()
QByteArrayreadAllStandardOutput ()
ProcessChannelreadChannel () const
ProcessChannelModereadChannelMode () const
voidsetEnvironment (const QStringList &environment)
voidsetProcessChannelMode (ProcessChannelMode mode)
voidsetProcessEnvironment (const QProcessEnvironment &environment)
voidsetReadChannel (ProcessChannel channel)
voidsetReadChannelMode (ProcessChannelMode mode)
voidsetStandardErrorFile (const QString &fileName, OpenMode mode=Truncate)
voidsetStandardInputFile (const QString &fileName)
voidsetStandardOutputFile (const QString &fileName, OpenMode mode=Truncate)
voidsetStandardOutputProcess (QProcess *destination)
voidsetWorkingDirectory (const QString &dir)
voidstart (const QString &program, const QStringList &arguments, OpenMode mode=ReadWrite)
voidstart (const QString &program, OpenMode mode=ReadWrite)
QProcess::ProcessStatestate () const
virtual boolwaitForBytesWritten (int msecs=30000)
boolwaitForFinished (int msecs=30000)
virtual boolwaitForReadyRead (int msecs=30000)
boolwaitForStarted (int msecs=30000)
QStringworkingDirectory () const
QStringerrorString () const Inherited
boolgetChar (char *c)Inherited
boolisOpen () const Inherited
boolisReadable () const Inherited
boolisTextModeEnabled () const Inherited
boolisWritable () const Inherited
virtual boolopen (OpenMode mode)Inherited
OpenModeopenMode () const Inherited
qint64peek (char *data, qint64 maxlen)Inherited
QByteArraypeek (qint64 maxlen)Inherited
virtual qint64pos () const Inherited
boolputChar (char c)Inherited
QIODevice ()Inherited
QIODevice (QObject *parent)Inherited
qint64read (char *data, qint64 maxlen)Inherited
QByteArrayread (qint64 maxlen)Inherited
QByteArrayreadAll ()Inherited
qint64readLine (char *data, qint64 maxlen)Inherited
QByteArrayreadLine (qint64 maxlen=0)Inherited
virtual boolreset ()Inherited
virtual boolseek (qint64 pos)Inherited
voidsetTextModeEnabled (bool enabled)Inherited
virtual qint64size () const Inherited
voidungetChar (char c)Inherited
qint64write (const char *data, qint64 len)Inherited
qint64write (const char *data)Inherited
qint64write (const QByteArray &data)Inherited

Static Public Functions Index

intexecute (const QString &program, const QStringList &arguments)
intexecute (const QString &program)
boolstartDetached (const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid=0)
boolstartDetached (const QString &program, const QStringList &arguments)
boolstartDetached (const QString &program)
QStringListsystemEnvironment ()

Protected Functions Index

virtual qint64readData (char *data, qint64 maxlen)
voidsetProcessState (ProcessState state)
virtual voidsetupChildProcess ()
virtual qint64writeData (const char *data, qint64 len)
QIODevice (QIODevicePrivate &dd, QObject *parent=0)Inherited
virtual qint64readLineData (char *data, qint64 maxlen)Inherited
voidsetErrorString (const QString &errorString)Inherited
voidsetOpenMode (OpenMode openMode)Inherited

Public Slots Index

voidkill ()
voidterminate ()

Signals Index

voiderror (QProcess::ProcessError error)
voidfinished (int exitCode)
voidfinished (int exitCode, QProcess::ExitStatus exitStatus)
voidreadyReadStandardError ()
voidreadyReadStandardOutput ()
voidstarted ()
voidstateChanged (QProcess::ProcessState state)
voidaboutToClose ()Inherited
voidbytesWritten (qint64 bytes)Inherited
voidreadChannelFinished ()Inherited
voidreadyRead ()Inherited

Public Types

ExitStatus

NormalExit
CrashExit

ProcessChannel

StandardOutput
StandardError

ProcessChannelMode

SeparateChannels
MergedChannels
ForwardedChannels

ProcessError

FailedToStart
Crashed
Timedout
ReadError
WriteError
UnknownError

ProcessState

NotRunning
Starting
Running

OpenModeFlag Inherited

NotOpen 0x0000
ReadOnly 0x0001
WriteOnly 0x0002
ReadWrite ReadOnly | WriteOnly
Append 0x0004
Truncate 0x0008
Text 0x0010
Unbuffered 0x0020

Public Functions

QProcess (

virtual~QProcess ()

Destructor.

virtual bool atEnd ()

virtual qint64 bytesAvailable ()

virtual qint64 bytesToWrite ()

virtual bool canReadLine ()

virtual void close ()

void closeReadChannel (
  • ProcessChannelchannel)

void closeWriteChannel ()

QStringList environment ()

QProcess::ProcessError error ()

int exitCode ()

QProcess::ExitStatus exitStatus ()

virtual bool isSequential ()

Q_PID pid ()

ProcessChannelMode processChannelMode ()

QProcessEnvironment processEnvironment ()

QByteArray readAllStandardError ()

QByteArray readAllStandardOutput ()

ProcessChannel readChannel ()

ProcessChannelMode readChannelMode ()

void setEnvironment (

void setProcessChannelMode (
  • ProcessChannelModemode)

void setProcessEnvironment (

void setReadChannel (
  • ProcessChannelchannel)

void setReadChannelMode (
  • ProcessChannelModemode)

void setStandardErrorFile (
  • const QString &fileName,
  • OpenModemode )

void setStandardInputFile (

void setStandardOutputFile (
  • const QString &fileName,
  • OpenModemode )

void setStandardOutputProcess (

void setWorkingDirectory (

void start (

void start (
  • const QString &program,
  • OpenModemode )

QProcess::ProcessState state ()

virtual bool waitForBytesWritten (
  • intmsecs)

bool waitForFinished (
  • intmsecs)

virtual bool waitForReadyRead (
  • intmsecs)

bool waitForStarted (
  • intmsecs)

QString workingDirectory ()

QString errorString ()Inherited

bool getChar (
  • char *c)
Inherited

bool isOpen ()Inherited

bool isReadable ()Inherited

bool isTextModeEnabled ()Inherited

bool isWritable ()Inherited

virtual bool open (
  • OpenModemode)
Inherited

OpenMode openMode ()Inherited

qint64 peek (
  • char *data,
  • qint64maxlen )
Inherited

QByteArray peek (
  • qint64maxlen)
Inherited

virtual qint64 pos ()Inherited

bool putChar (
  • charc)
Inherited

QIODevice ()Inherited

QIODevice (Inherited

qint64 read (
  • char *data,
  • qint64maxlen )
Inherited

QByteArray read (
  • qint64maxlen)
Inherited

QByteArray readAll ()Inherited

qint64 readLine (
  • char *data,
  • qint64maxlen )
Inherited

QByteArray readLine (
  • qint64maxlen)
Inherited

virtual bool reset ()Inherited

virtual bool seek (
  • qint64pos)
Inherited

void setTextModeEnabled (
  • boolenabled)
Inherited

virtual qint64 size ()Inherited

void ungetChar (
  • charc)
Inherited

qint64 write (
  • const char *data,
  • qint64len )
Inherited

qint64 write (
  • const char *data)
Inherited

qint64 write (Inherited

Static Public Functions

int execute (

int execute (

bool startDetached (

bool startDetached (

bool startDetached (

QStringList systemEnvironment ()

Protected Functions

virtual qint64 readData (
  • char *data,
  • qint64maxlen )

void setProcessState (
  • ProcessStatestate)

virtual void setupChildProcess ()

virtual qint64 writeData (
  • const char *data,
  • qint64len )

QIODevice (
  • QIODevicePrivate &dd,
  • QObject *parent )
Inherited

virtual qint64 readLineData (
  • char *data,
  • qint64maxlen )
Inherited

void setErrorString (Inherited

void setOpenMode (
  • OpenModeopenMode)
Inherited

Public Slots

void kill ()

void terminate ()

Signals

void error (
  • QProcess::ProcessErrorerror)

void finished (
  • intexitCode)

void finished (
  • intexitCode,
  • QProcess::ExitStatusexitStatus )

void readyReadStandardError ()

void readyReadStandardOutput ()

void started ()

void stateChanged (
  • QProcess::ProcessStatestate)

void aboutToClose ()Inherited

void bytesWritten (
  • qint64bytes)
Inherited

void readChannelFinished ()Inherited

void readyRead ()Inherited

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus