qt-获取system调用返回信息
QString QFun::GetResultFromSystemCall(const char *pCmd)
{
FILE *stream;
char buf[2048];
memset( buf, '\0', sizeof(buf) );
stream = popen( pCmd, "r" );
fread( buf, sizeof(char), sizeof(buf), stream);
pclose( stream );
return QString(buf);
}