Qt使用 QProcess 调用命令不会显示界面 可以很好的在客户端使用
QProcess * po = new Process(this);
QString program = "C:\\bitcoin\\bitcoind.exe";
QStringList argu;
po->start(program,argu);
//等待命令启动
po->waitForStarted();
//po->waitForFinished();
QProcess * po2 = new QProcess(this);
QString program1 = "C:\\bitcoin\\bitcoin-cli.exe";
//添加后续参数
QStringList argu1;
argu1.append("getnewaddress");
po2->start(program1,argu1);
po2->waitForStarted();
//等待结束
po2->waitForFinished();
//获取结果
QString strTemp=QString::fromLocal8Bit(po2->readAllStandardOutput());
QMessageBox testMassage1;
testMassage1.setText(strTemp);
testMassage1.exec();