话不多直接上本人代码
|
1
2
3
4
5
6
7
8
9 |
void
MainWindow::on_pushButton_3_clicked(){ myprocess = new
QProcess(this); myprocess->start("pwd"); myprocess->waitForFinished(); QString abc = myprocess->readAllStandardOutput(); QLibX::QMessageBoxEx::GetInstance()->information(this,"Title",abc);} |
http://stackoverflow.com/questions/11921004/cannot-read-output-using-readyreadstandardoutput-in-qt

原文:http://www.cnblogs.com/sollyu/p/3680245.html