QProcess prc= new QProcess (parent); QObject::connect(prc, SIGNAL(readyReadStandardOutput ()), this, SLOT(read_prc()) ); prc->start("my_proga.exe", QStringList() << arg1,,arg2);
Std::cout<<"hello world";
ypr::ypr(QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags){ ui.setupUi(this); QStringList arg; arg<<"rm1"<<"0"<<"ARMO"<<"98"<<"198"<<"192.168.1.29"; pr_obz=new QProcess(parent); pr_obz->setReadChannel(QProcess::StandardOutput); pr_obz->setReadChannelMode(QProcess::MergedChannels); pr_obz->start("TKO.exe", arg); pr_obz->waitForStarted(); bool bn=false; bn=connect(pr_obz,SIGNAL(readyReadStandardOutput()),this,SLOT(Slott()));}void ypr::Slott(){ QString str=pr_obz->readAllStandardOutput(); ui.lineEdit->setText(str);}
#include <iostream>using namespace std;TKO::TKO(QWidget *parent,Qt::WindowFlags flags, int argc,char *argv[]) : QWidget(parent,flags), ui(new Ui::TKO){ ui->setupUi(this); std::cout<<"hello"; \\ добавлю конец строки}