1Qter豆
最佳答案可以使用QProcess来实现。
pro = new QProcess(this);
pro->start("ping www.baidu.com");
connect(pro, SIGNAL(readyReadStandardOutput()),this ,SLOT(read()));
在槽里面:
void MainWindow::read()
{
qDebug() readAllStandardOutput();
}
你也可以直接将输出显示在界面上。
| ||
相关帖子
|
||
2013-5-3 15:53:40
显示全部楼层
| ||
2013-5-6 23:47:33
显示全部楼层
| |
2013-5-7 22:58:11
显示全部楼层
| ||
2013-5-8 09:21:23
显示全部楼层
| |
2013-5-11 11:16:14
显示全部楼层
| ||