KCoreAddons
kprocess.h
247 static int execute(const QString &exe, const QStringList &args = QStringList(), int msecs = -1);
void setShellCommand(const QString &cmd)
Set a command to execute through a shell (a POSIX sh on *NIX and cmd.exe on Windows).
Definition kprocess.cpp:176
void setNextOpenMode(QIODevice::OpenMode mode)
Set the QIODevice open mode the process will be opened in.
Definition kprocess.cpp:54
@ OnlyStdoutChannel
Only standard output is handled; standard error is forwarded.
Definition kprocess.h:52
@ MergedChannels
Standard output and standard error are handled by KProcess as one channel.
Definition kprocess.h:46
@ ForwardedChannels
Both standard output and standard error are forwarded to the parent process' respective channel.
Definition kprocess.h:49
@ SeparateChannels
Standard output and standard error are handled by KProcess as separate channels.
Definition kprocess.h:43
@ OnlyStderrChannel
Only standard error is handled; standard output is forwarded.
Definition kprocess.h:54
void unsetEnv(const QString &name)
Removes the variable name from the process' environment.
Definition kprocess.cpp:92
KProcess & operator<<(const QString &arg)
Append an element to the command line argument list for this process.
Definition kprocess.cpp:139
OutputChannelMode outputChannelMode() const
Query how the output channels of the child process are handled.
Definition kprocess.cpp:49
void setOutputChannelMode(OutputChannelMode mode)
Set how to handle the output channels of the child process.
Definition kprocess.cpp:44
void setEnv(const QString &name, const QString &value, bool overwrite=true)
Adds the variable name to the process' environment.
Definition kprocess.cpp:68
Q_SCRIPTABLE Q_NOREPLY void start()
typedef OpenMode
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
QObject * parent() const const
SeparateChannels
QProcess(QObject *parent)
int execute(const QString &program, const QStringList &arguments)
ProcessChannelMode processChannelMode() const const
QString program() const const
void setProcessChannelMode(ProcessChannelMode mode)
void setProgram(const QString &program)
bool startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Thu Jan 23 2025 18:52:01 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Thu Jan 23 2025 18:52:01 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.