summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qprocess.cpp')
-rw-r--r--src/corelib/io/qprocess.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 6fc6710..18ed676 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -151,12 +151,19 @@ void QProcessPrivate::Channel::clear()
to communicate with them.
\ingroup io
- \ingroup misc
- \mainclass
+
\reentrant
+ \section1 Running a Process
+
To start a process, pass the name and command line arguments of
- the program you want to run as arguments to start(). For example:
+ the program you want to run as arguments to start(). Arguments
+ are supplied as individual strings in a QStringList.
+
+ For example, the following code snippet runs the analog clock
+ example in the Motif style on X11 platforms by passing strings
+ containing "-style" and "motif" as two items in the list of
+ arguments:
\snippet doc/src/snippets/qprocess/qprocess-simpleexecution.cpp 0
\dots
@@ -1585,16 +1592,16 @@ QByteArray QProcess::readAllStandardError()
process, a warning may be printed at the console, and the existing
process will continue running.
- Note that arguments that contain spaces are not passed to the
+ \note Arguments that contain spaces are not passed to the
process as separate arguments.
- \bold{Windows:} Arguments that contain spaces are wrapped in quotes.
-
\note Processes are started asynchronously, which means the started()
and error() signals may be delayed. Call waitForStarted() to make
sure the process has started (or has failed to start) and those signals
have been emitted.
+ \bold{Windows:} Arguments that contain spaces are wrapped in quotes.
+
\sa pid(), started(), waitForStarted()
*/
void QProcess::start(const QString &program, const QStringList &arguments, OpenMode mode)
@@ -1860,7 +1867,7 @@ bool QProcess::startDetached(const QString &program,
otherwise returns false. If the calling process exits, the
detached process will continue to live.
- Note that arguments that contain spaces are not passed to the
+ \note Arguments that contain spaces are not passed to the
process as separate arguments.
\bold{Unix:} The started process will run in its own session and act