API reference - Class QProcess

Notation used in Ruby API documentation

Description: Binding of QProcess

Class hierarchy: QProcess » QIODevice » QObject

Sub-classes: ExitStatus, ProcessChannel, ProcessChannelMode, ProcessError, ProcessState

Public constructors

new QProcessnew(QObject ptr parent = 0)Constructor QProcess::QProcess(QObject *parent)

Public methods

void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
[event]voidaboutToCloseSignal declaration for QProcess::aboutToClose()
[const]boolatEndMethod bool QProcess::atEnd()
[const]long longbytesAvailableMethod qint64 QProcess::bytesAvailable()
[const]long longbytesToWriteMethod qint64 QProcess::bytesToWrite()
[event]voidbytesWritten(long long bytes)Signal declaration for QProcess::bytesWritten(qint64 bytes)
[const]boolcanReadLineMethod bool QProcess::canReadLine()
voidcloseMethod void QProcess::close()
voidcloseReadChannel(const QProcess_ProcessChannel channel)Method void QProcess::closeReadChannel(QProcess::ProcessChannel channel)
voidcloseWriteChannelMethod void QProcess::closeWriteChannel()
[event]voiddestroyed(QObject ptr arg1)Signal declaration for QProcess::destroyed(QObject *)
[const]string[]environmentMethod QStringList QProcess::environment()
voidenvironment=(string[] environment)Method void QProcess::setEnvironment(const QStringList &environment)
[const]QProcess_ProcessErrorerrorMethod QProcess::ProcessError QProcess::error()
[event]voiderror(const QProcess_ProcessError error)Signal declaration for QProcess::error(QProcess::ProcessError error)
[const]intexitCodeMethod int QProcess::exitCode()
[const]QProcess_ExitStatusexitStatusMethod QProcess::ExitStatus QProcess::exitStatus()
[event]voidfinished(int exitCode)Signal declaration for QProcess::finished(int exitCode)
[event]voidfinished(int exitCode,
const QProcess_ExitStatus exitStatus)
Signal declaration for QProcess::finished(int exitCode, QProcess::ExitStatus exitStatus)
[const]boolisSequential?Method bool QProcess::isSequential()
voidkillMethod void QProcess::kill()
[const]unsigned longpidMethod Q_PID QProcess::pid()
[const]QProcess_ProcessChannelModeprocessChannelModeMethod QProcess::ProcessChannelMode QProcess::processChannelMode()
voidprocessChannelMode=(const QProcess_ProcessChannelMode mode)Method void QProcess::setProcessChannelMode(QProcess::ProcessChannelMode mode)
[const]QProcessEnvironmentprocessEnvironmentMethod QProcessEnvironment QProcess::processEnvironment()
voidprocessEnvironment=(const QProcessEnvironment environment)Method void QProcess::setProcessEnvironment(const QProcessEnvironment &environment)
stringreadAllStandardErrorMethod QByteArray QProcess::readAllStandardError()
stringreadAllStandardOutputMethod QByteArray QProcess::readAllStandardOutput()
[const]QProcess_ProcessChannelreadChannelMethod QProcess::ProcessChannel QProcess::readChannel()
voidreadChannel=(const QProcess_ProcessChannel channel)Method void QProcess::setReadChannel(QProcess::ProcessChannel channel)
[event]voidreadChannelFinishedSignal declaration for QProcess::readChannelFinished()
[const]QProcess_ProcessChannelModereadChannelModeMethod QProcess::ProcessChannelMode QProcess::readChannelMode()
voidreadChannelMode=(const QProcess_ProcessChannelMode mode)Method void QProcess::setReadChannelMode(QProcess::ProcessChannelMode mode)
[event]voidreadyReadSignal declaration for QProcess::readyRead()
[event]voidreadyReadStandardErrorSignal declaration for QProcess::readyReadStandardError()
[event]voidreadyReadStandardOutputSignal declaration for QProcess::readyReadStandardOutput()
voidsetEnvironment(string[] environment)Method void QProcess::setEnvironment(const QStringList &environment)
voidsetProcessChannelMode(const QProcess_ProcessChannelMode mode)Method void QProcess::setProcessChannelMode(QProcess::ProcessChannelMode mode)
voidsetProcessEnvironment(const QProcessEnvironment environment)Method void QProcess::setProcessEnvironment(const QProcessEnvironment &environment)
voidsetReadChannel(const QProcess_ProcessChannel channel)Method void QProcess::setReadChannel(QProcess::ProcessChannel channel)
voidsetReadChannelMode(const QProcess_ProcessChannelMode mode)Method void QProcess::setReadChannelMode(QProcess::ProcessChannelMode mode)
voidsetStandardErrorFile(string fileName,
const QIODevice_QFlags_OpenModeFlag mode = QIODevice::Truncate)
Method void QProcess::setStandardErrorFile(const QString &fileName, QFlags<QIODevice::OpenModeFlag> mode)
voidsetStandardInputFile(string fileName)Method void QProcess::setStandardInputFile(const QString &fileName)
voidsetStandardOutputFile(string fileName,
const QIODevice_QFlags_OpenModeFlag mode = QIODevice::Truncate)
Method void QProcess::setStandardOutputFile(const QString &fileName, QFlags<QIODevice::OpenModeFlag> mode)
voidsetStandardOutputProcess(QProcess ptr destination)Method void QProcess::setStandardOutputProcess(QProcess *destination)
voidsetWorkingDirectory(string dir)Method void QProcess::setWorkingDirectory(const QString &dir)
voidstart(string program,
string[] arguments,
const QIODevice_QFlags_OpenModeFlag mode = QIODevice::ReadWrite)
Method void QProcess::start(const QString &program, const QStringList &arguments, QFlags<QIODevice::OpenModeFlag> mode)
voidstart(string program,
const QIODevice_QFlags_OpenModeFlag mode = QIODevice::ReadWrite)
Method void QProcess::start(const QString &program, QFlags<QIODevice::OpenModeFlag> mode)
[event]voidstartedSignal declaration for QProcess::started()
[const]QProcess_ProcessStatestateMethod QProcess::ProcessState QProcess::state()
[event]voidstateChanged(const QProcess_ProcessState state)Signal declaration for QProcess::stateChanged(QProcess::ProcessState state)
voidterminateMethod void QProcess::terminate()
boolwaitForBytesWritten(int msecs = 30000)Method bool QProcess::waitForBytesWritten(int msecs)
boolwaitForFinished(int msecs = 30000)Method bool QProcess::waitForFinished(int msecs)
boolwaitForReadyRead(int msecs = 30000)Method bool QProcess::waitForReadyRead(int msecs)
boolwaitForStarted(int msecs = 30000)Method bool QProcess::waitForStarted(int msecs)
[const]stringworkingDirectoryMethod QString QProcess::workingDirectory()
voidworkingDirectory=(string dir)Method void QProcess::setWorkingDirectory(const QString &dir)

Public static methods and constants

[static,const]new QProcess_ExitStatus ptrCrashExitEnum constant QProcess::CrashExit
[static,const]new QProcess_ProcessError ptrCrashedEnum constant QProcess::Crashed
[static,const]new QProcess_ProcessError ptrFailedToStartEnum constant QProcess::FailedToStart
[static,const]new QProcess_ProcessChannelMode ptrForwardedChannelsEnum constant QProcess::ForwardedChannels
[static,const]new QProcess_ProcessChannelMode ptrMergedChannelsEnum constant QProcess::MergedChannels
[static,const]new QProcess_ExitStatus ptrNormalExitEnum constant QProcess::NormalExit
[static,const]new QProcess_ProcessState ptrNotRunningEnum constant QProcess::NotRunning
[static,const]new QProcess_ProcessError ptrReadErrorEnum constant QProcess::ReadError
[static,const]new QProcess_ProcessState ptrRunningEnum constant QProcess::Running
[static,const]new QProcess_ProcessChannelMode ptrSeparateChannelsEnum constant QProcess::SeparateChannels
[static,const]new QProcess_ProcessChannel ptrStandardErrorEnum constant QProcess::StandardError
[static,const]new QProcess_ProcessChannel ptrStandardOutputEnum constant QProcess::StandardOutput
[static,const]new QProcess_ProcessState ptrStartingEnum constant QProcess::Starting
[static,const]new QProcess_ProcessError ptrTimedoutEnum constant QProcess::Timedout
[static,const]new QProcess_ProcessError ptrUnknownErrorEnum constant QProcess::UnknownError
[static,const]new QProcess_ProcessError ptrWriteErrorEnum constant QProcess::WriteError
intexecute(string program,
string[] arguments)
Static method int QProcess::execute(const QString &program, const QStringList &arguments)
intexecute(string program)Static method int QProcess::execute(const QString &program)
boolstartDetached(string program,
string[] arguments,
string workingDirectory,
long long ptr pid = 0)
Static method bool QProcess::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)
boolstartDetached(string program,
string[] arguments)
Static method bool QProcess::startDetached(const QString &program, const QStringList &arguments)
boolstartDetached(string program)Static method bool QProcess::startDetached(const QString &program)
QMetaObjectstaticMetaObjectObtains the static MetaObject for this class.
string[]systemEnvironmentStatic method QStringList QProcess::systemEnvironment()
stringtr(string s,
string c = 0)
Static method QString QProcess::tr(const char *s, const char *c)
stringtr(string s,
string c,
int n)
Static method QString QProcess::tr(const char *s, const char *c, int n)
stringtrUtf8(string s,
string c = 0)
Static method QString QProcess::trUtf8(const char *s, const char *c)
stringtrUtf8(string s,
string c,
int n)
Static method QString QProcess::trUtf8(const char *s, const char *c, int n)

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

[static,const] new QProcess_ExitStatus ptr CrashExit

Description: Enum constant QProcess::CrashExit

[static,const] new QProcess_ProcessError ptr Crashed

Description: Enum constant QProcess::Crashed

[static,const] new QProcess_ProcessError ptr FailedToStart

Description: Enum constant QProcess::FailedToStart

[static,const] new QProcess_ProcessChannelMode ptr ForwardedChannels

Description: Enum constant QProcess::ForwardedChannels

[static,const] new QProcess_ProcessChannelMode ptr MergedChannels

Description: Enum constant QProcess::MergedChannels

[static,const] new QProcess_ExitStatus ptr NormalExit

Description: Enum constant QProcess::NormalExit

[static,const] new QProcess_ProcessState ptr NotRunning

Description: Enum constant QProcess::NotRunning

[static,const] new QProcess_ProcessError ptr ReadError

Description: Enum constant QProcess::ReadError

[static,const] new QProcess_ProcessState ptr Running

Description: Enum constant QProcess::Running

[static,const] new QProcess_ProcessChannelMode ptr SeparateChannels

Description: Enum constant QProcess::SeparateChannels

[static,const] new QProcess_ProcessChannel ptr StandardError

Description: Enum constant QProcess::StandardError

[static,const] new QProcess_ProcessChannel ptr StandardOutput

Description: Enum constant QProcess::StandardOutput

[static,const] new QProcess_ProcessState ptr Starting

Description: Enum constant QProcess::Starting

[static,const] new QProcess_ProcessError ptr Timedout

Description: Enum constant QProcess::Timedout

[static,const] new QProcess_ProcessError ptr UnknownError

Description: Enum constant QProcess::UnknownError

[static,const] new QProcess_ProcessError ptr WriteError

Description: Enum constant QProcess::WriteError

void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

[const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

[event] void aboutToClose

Description: Signal declaration for QProcess::aboutToClose()

You can bind a procedure to this signal.

[const] bool atEnd

Description: Method bool QProcess::atEnd()

This is a reimplementation of QIODevice::atEnd

[const] long long bytesAvailable

Description: Method qint64 QProcess::bytesAvailable()

This is a reimplementation of QIODevice::bytesAvailable

[const] long long bytesToWrite

Description: Method qint64 QProcess::bytesToWrite()

This is a reimplementation of QIODevice::bytesToWrite

[event] void bytesWritten(long long bytes)

Description: Signal declaration for QProcess::bytesWritten(qint64 bytes)

You can bind a procedure to this signal.

[const] bool canReadLine

Description: Method bool QProcess::canReadLine()

This is a reimplementation of QIODevice::canReadLine

void close

Description: Method void QProcess::close()

This is a reimplementation of QIODevice::close

void closeReadChannel(const QProcess_ProcessChannel channel)

Description: Method void QProcess::closeReadChannel(QProcess::ProcessChannel channel)

void closeWriteChannel

Description: Method void QProcess::closeWriteChannel()

void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

[event] void destroyed(QObject ptr arg1)

Description: Signal declaration for QProcess::destroyed(QObject *)

You can bind a procedure to this signal.

[const] string[] environment

Description: Method QStringList QProcess::environment()

Python specific notes:

The object exposes a readable attribute 'environment'. This is the getter.

void environment=(string[] environment)

Description: Method void QProcess::setEnvironment(const QStringList &environment)

Python specific notes:

The object exposes a writable attribute 'environment'. This is the setter.

[const] QProcess_ProcessError error

Description: Method QProcess::ProcessError QProcess::error()

[event] void error(const QProcess_ProcessError error)

Description: Signal declaration for QProcess::error(QProcess::ProcessError error)

You can bind a procedure to this signal.

[static] int execute(string program,string[] arguments)

Description: Static method int QProcess::execute(const QString &program, const QStringList &arguments)

This method is static and can be called without an instance.

[static] int execute(string program)

Description: Static method int QProcess::execute(const QString &program)

This method is static and can be called without an instance.

[const] int exitCode

Description: Method int QProcess::exitCode()

[const] QProcess_ExitStatus exitStatus

Description: Method QProcess::ExitStatus QProcess::exitStatus()

[event] void finished(int exitCode)

Description: Signal declaration for QProcess::finished(int exitCode)

You can bind a procedure to this signal.

[event] void finished(int exitCode,const QProcess_ExitStatus exitStatus)

Description: Signal declaration for QProcess::finished(int exitCode, QProcess::ExitStatus exitStatus)

You can bind a procedure to this signal.

[const] bool isSequential?

Description: Method bool QProcess::isSequential()

This is a reimplementation of QIODevice::isSequential

[const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

void kill

Description: Method void QProcess::kill()

[static] new QProcess new(QObject ptr parent = 0)

Description: Constructor QProcess::QProcess(QObject *parent)

This method creates an object of class QProcess.

Python specific notes:

This method is the default initializer of the object

[const] unsigned long pid

Description: Method Q_PID QProcess::pid()

[const] QProcess_ProcessChannelMode processChannelMode

Description: Method QProcess::ProcessChannelMode QProcess::processChannelMode()

Python specific notes:

The object exposes a readable attribute 'processChannelMode'. This is the getter.

void processChannelMode=(const QProcess_ProcessChannelMode mode)

Description: Method void QProcess::setProcessChannelMode(QProcess::ProcessChannelMode mode)

Python specific notes:

The object exposes a writable attribute 'processChannelMode'. This is the setter.

[const] QProcessEnvironment processEnvironment

Description: Method QProcessEnvironment QProcess::processEnvironment()

Python specific notes:

The object exposes a readable attribute 'processEnvironment'. This is the getter.

void processEnvironment=(const QProcessEnvironment environment)

Description: Method void QProcess::setProcessEnvironment(const QProcessEnvironment &environment)

Python specific notes:

The object exposes a writable attribute 'processEnvironment'. This is the setter.

string readAllStandardError

Description: Method QByteArray QProcess::readAllStandardError()

string readAllStandardOutput

Description: Method QByteArray QProcess::readAllStandardOutput()

[const] QProcess_ProcessChannel readChannel

Description: Method QProcess::ProcessChannel QProcess::readChannel()

Python specific notes:

The object exposes a readable attribute 'readChannel'. This is the getter.

void readChannel=(const QProcess_ProcessChannel channel)

Description: Method void QProcess::setReadChannel(QProcess::ProcessChannel channel)

Python specific notes:

The object exposes a writable attribute 'readChannel'. This is the setter.

[event] void readChannelFinished

Description: Signal declaration for QProcess::readChannelFinished()

You can bind a procedure to this signal.

[const] QProcess_ProcessChannelMode readChannelMode

Description: Method QProcess::ProcessChannelMode QProcess::readChannelMode()

Python specific notes:

The object exposes a readable attribute 'readChannelMode'. This is the getter.

void readChannelMode=(const QProcess_ProcessChannelMode mode)

Description: Method void QProcess::setReadChannelMode(QProcess::ProcessChannelMode mode)

Python specific notes:

The object exposes a writable attribute 'readChannelMode'. This is the setter.

[event] void readyRead

Description: Signal declaration for QProcess::readyRead()

You can bind a procedure to this signal.

[event] void readyReadStandardError

Description: Signal declaration for QProcess::readyReadStandardError()

You can bind a procedure to this signal.

[event] void readyReadStandardOutput

Description: Signal declaration for QProcess::readyReadStandardOutput()

You can bind a procedure to this signal.

void setEnvironment(string[] environment)

Description: Method void QProcess::setEnvironment(const QStringList &environment)

Python specific notes:

The object exposes a writable attribute 'environment'. This is the setter.

void setProcessChannelMode(const QProcess_ProcessChannelMode mode)

Description: Method void QProcess::setProcessChannelMode(QProcess::ProcessChannelMode mode)

Python specific notes:

The object exposes a writable attribute 'processChannelMode'. This is the setter.

void setProcessEnvironment(const QProcessEnvironment environment)

Description: Method void QProcess::setProcessEnvironment(const QProcessEnvironment &environment)

Python specific notes:

The object exposes a writable attribute 'processEnvironment'. This is the setter.

void setReadChannel(const QProcess_ProcessChannel channel)

Description: Method void QProcess::setReadChannel(QProcess::ProcessChannel channel)

Python specific notes:

The object exposes a writable attribute 'readChannel'. This is the setter.

void setReadChannelMode(const QProcess_ProcessChannelMode mode)

Description: Method void QProcess::setReadChannelMode(QProcess::ProcessChannelMode mode)

Python specific notes:

The object exposes a writable attribute 'readChannelMode'. This is the setter.

void setStandardErrorFile(string fileName,const QIODevice_QFlags_OpenModeFlag mode = QIODevice::Truncate)

Description: Method void QProcess::setStandardErrorFile(const QString &fileName, QFlags<QIODevice::OpenModeFlag> mode)

void setStandardInputFile(string fileName)

Description: Method void QProcess::setStandardInputFile(const QString &fileName)

void setStandardOutputFile(string fileName,const QIODevice_QFlags_OpenModeFlag mode = QIODevice::Truncate)

Description: Method void QProcess::setStandardOutputFile(const QString &fileName, QFlags<QIODevice::OpenModeFlag> mode)

void setStandardOutputProcess(QProcess ptr destination)

Description: Method void QProcess::setStandardOutputProcess(QProcess *destination)

void setWorkingDirectory(string dir)

Description: Method void QProcess::setWorkingDirectory(const QString &dir)

Python specific notes:

The object exposes a writable attribute 'workingDirectory'. This is the setter.

void start(string program,string[] arguments,const QIODevice_QFlags_OpenModeFlag mode = QIODevice::ReadWrite)

Description: Method void QProcess::start(const QString &program, const QStringList &arguments, QFlags<QIODevice::OpenModeFlag> mode)

void start(string program,const QIODevice_QFlags_OpenModeFlag mode = QIODevice::ReadWrite)

Description: Method void QProcess::start(const QString &program, QFlags<QIODevice::OpenModeFlag> mode)

[static] bool startDetached(string program,string[] arguments,string workingDirectory,long long ptr pid = 0)

Description: Static method bool QProcess::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)

This method is static and can be called without an instance.

[static] bool startDetached(string program,string[] arguments)

Description: Static method bool QProcess::startDetached(const QString &program, const QStringList &arguments)

This method is static and can be called without an instance.

[static] bool startDetached(string program)

Description: Static method bool QProcess::startDetached(const QString &program)

This method is static and can be called without an instance.

[event] void started

Description: Signal declaration for QProcess::started()

You can bind a procedure to this signal.

[const] QProcess_ProcessState state

Description: Method QProcess::ProcessState QProcess::state()

[event] void stateChanged(const QProcess_ProcessState state)

Description: Signal declaration for QProcess::stateChanged(QProcess::ProcessState state)

You can bind a procedure to this signal.

[static] QMetaObject staticMetaObject

Description: Obtains the static MetaObject for this class.

[static] string[] systemEnvironment

Description: Static method QStringList QProcess::systemEnvironment()

This method is static and can be called without an instance.

void terminate

Description: Method void QProcess::terminate()

[static] string tr(string s,string c = 0)

Description: Static method QString QProcess::tr(const char *s, const char *c)

This method is static and can be called without an instance.

[static] string tr(string s,string c,int n)

Description: Static method QString QProcess::tr(const char *s, const char *c, int n)

This method is static and can be called without an instance.

[static] string trUtf8(string s,string c = 0)

Description: Static method QString QProcess::trUtf8(const char *s, const char *c)

This method is static and can be called without an instance.

[static] string trUtf8(string s,string c,int n)

Description: Static method QString QProcess::trUtf8(const char *s, const char *c, int n)

This method is static and can be called without an instance.

bool waitForBytesWritten(int msecs = 30000)

Description: Method bool QProcess::waitForBytesWritten(int msecs)

This is a reimplementation of QIODevice::waitForBytesWritten

bool waitForFinished(int msecs = 30000)

Description: Method bool QProcess::waitForFinished(int msecs)

bool waitForReadyRead(int msecs = 30000)

Description: Method bool QProcess::waitForReadyRead(int msecs)

This is a reimplementation of QIODevice::waitForReadyRead

bool waitForStarted(int msecs = 30000)

Description: Method bool QProcess::waitForStarted(int msecs)

[const] string workingDirectory

Description: Method QString QProcess::workingDirectory()

Python specific notes:

The object exposes a readable attribute 'workingDirectory'. This is the getter.

void workingDirectory=(string dir)

Description: Method void QProcess::setWorkingDirectory(const QString &dir)

Python specific notes:

The object exposes a writable attribute 'workingDirectory'. This is the setter.