Qt: qprocess

Source: Internet
Author: User

The qprocess class is used to start another appearance and contact them.

Start a process by passing the name of the program you want to run and the command line parameter to the START () function. Parameters are provided as independent strings.

 

Qprocess runs and treats a process like an I/O device. You can read and write data from a process, just like a network TCP socket. You can use write () to write standard input to the process, or read standard output from the program through read (), Readline (), and getchar. Because it inherits the qiodevice class. Qprocess can also be a qxmlreader class as an input source.

When the process ends, qprocess enters the notrunning state again and sends a finished () signal.

The finished () signal provides the exit code and end state of the process as parameters. You can call the exitcode () function to obtain the exit code of the previous finished process. The exitstatus () function obtains its exit status. If an error occurs at any time, qprocess will receive an error () signal. You can also call the error () function to find the type of the last error, and use state () to find the current state of the process.

Qt: qprocess

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.