void xianshi::startmypro()
{ sendbutton->setEnabled(false);
editor->setText("start process.");
pro->setProcessChannelMode(QProcess::MergedChannels);
//pro->addArgument( "test" );
connect(pro,SIGNAL(readyReadStandardOutput()),this,SLOT(readprostdout()));
pro->start("text"); }
外部程序text.exe 我放在和 QT可执行文件一个目录下,为什么启动不了外部程序啊 ?谢谢各位了,帮我看下
下面是我的text的源代码
#include <stdio.h>
#include <stdlib.h>
int main()
{
int k;
freopen("file.txt","w",stdout);
for(int i=0;i<10;i++)
{
printf("%d test.....\n",i);
for(int j=0;j<500;j++)
{k=100;}
//Sleep(500);
}
return 0;
}
[ 此贴被cattle1225在2008-02-21 17:26重新编辑 ]