Sollyu

导航

 

代码

话不多直接上本人代码

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

效果

 

posted on 2014-04-22 12:31  sollyu  阅读(1077)  评论(0编辑  收藏  举报