Skip to content

PythonQt.QtCore.QProcess · declarations 003

Back to PythonQt.QtCore.QProcess

stateChanged

stateChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtCore.QProcess.stateChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QProcess::stateChanged(QProcess::ProcessState newState)

This signal is emitted whenever the state of QProcess changes. The newState argument is the state QProcess changed to.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

Source: https://doc.qt.io/archives/qt-5.15/qprocess.html#stateChanged

systemEnvironment

systemEnvironment() -> tuple

X.systemEnvironment() -> tuple

Supplemental documentation: Qt 5 reference:

[static] QStringList QProcess::systemEnvironment()

Returns the environment of the calling process as a list of key\=value pairs. Example:

QStringList environment = QProcess::systemEnvironment();
// environment = {"PATH=/usr/bin:/usr/local/bin",
//                "USER=greg", "HOME=/home/greg"}

This function does not cache the system environment. Therefore, it's possible to obtain an updated version of the environment if low-level C library functions like setenv or putenv have been called.

However, note that repeated calls to this function will recreate the list of environment variables, which is a non-trivial operation.

Note: For new code, it is recommended to use QProcessEnvironment::systemEnvironment()

This function was introduced in Qt 4.1.

See also QProcessEnvironment::systemEnvironment() and setProcessEnvironment().

Upstream PySide2 reference signatures (binding differences may apply):

systemEnvironment() -> typing.List[str]

Source: https://doc.qt.io/archives/qt-5.15/qprocess.html#systemEnvironment

terminate

terminate() -> None

X.terminate()

Supplemental documentation: Qt 5 reference:

[slot] void QProcess::terminate()

Attempts to terminate the process.

The process may not exit as a result of calling this function (it is given the chance to prompt the user for any unsaved files, etc).

On Windows, terminate() posts a WM_CLOSE message to all top-level windows of the process and then to the main thread of the process itself. On Unix and macOS the SIGTERM signal is sent.

Console applications on Windows that do not run an event loop, or whose event loop does not handle the WM_CLOSE message, can only be terminated by calling kill().

See also kill().

Upstream PySide2 reference signatures (binding differences may apply):

terminate(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qprocess.html#terminate

waitForBytesWritten

waitForBytesWritten(msecs: int) -> bool

X.waitForBytesWritten(msecs) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual] bool QProcess::waitForBytesWritten(int msecs \= 30000)

Reimplements: QIODevice::waitForBytesWritten(int msecs).

Upstream PySide2 reference signatures (binding differences may apply):

waitForBytesWritten(self, msecs: int=...) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qprocess.html#waitForBytesWritten

waitForFinished

waitForFinished(msecs: int) -> bool

X.waitForFinished(msecs) -> bool

Supplemental documentation: Qt 5 reference:

bool QProcess::waitForFinished(int msecs \= 30000)

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

Returns true if the process finished; otherwise returns false (if the operation timed out, if an error occurred, or if this QProcess is already finished).

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.

Warning: 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 finished(), waitForStarted(), waitForReadyRead(), and waitForBytesWritten().

Upstream PySide2 reference signatures (binding differences may apply):

waitForFinished(self, msecs: int=...) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qprocess.html#waitForFinished

waitForReadyRead

waitForReadyRead(msecs: int) -> bool

X.waitForReadyRead(msecs) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual] bool QProcess::waitForReadyRead(int msecs \= 30000)

Reimplements: QIODevice::waitForReadyRead(int msecs).

Upstream PySide2 reference signatures (binding differences may apply):

waitForReadyRead(self, msecs: int=...) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qprocess.html#waitForReadyRead

waitForStarted

waitForStarted(msecs: int) -> bool

X.waitForStarted(msecs) -> bool

Supplemental documentation: Qt 5 reference:

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.

Warning: 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.

Note: On some UNIX operating systems, this function may return true but the process may later report a QProcess::FailedToStart error.

See also started(), waitForReadyRead(), waitForBytesWritten(), and waitForFinished().

Upstream PySide2 reference signatures (binding differences may apply):

waitForStarted(self, msecs: int=...) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qprocess.html#waitForStarted

workingDirectory

workingDirectory() -> str

X.workingDirectory() -> str

Supplemental documentation: Qt 5 reference:

QString QProcess::workingDirectory() const

If QProcess has been assigned a working directory, this function returns the working directory that the QProcess will enter before the program has started. Otherwise, (i.e., no directory has been assigned,) an empty string is returned, and QProcess will use the application's current working directory instead.

See also setWorkingDirectory().

Upstream PySide2 reference signatures (binding differences may apply):

workingDirectory(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qprocess.html#workingDirectory

writeData

writeData(data: str, len: int) -> int

X.writeData(data, len) -> int

Supplemental documentation: Qt 5 reference:

[override virtual protected] qint64 QProcess::writeData(const char *data, qint64 len)

Reimplements: QIODevice::writeData(const char *data, qint64 maxSize).

Upstream PySide2 reference signatures (binding differences may apply):

writeData(self, data: str, len: int) -> int

Source: https://doc.qt.io/archives/qt-5.15/qprocess.html#writeData