int main(){int a=1;qDebug()<<a;//тут код...a=2;qDebug()<<a;}
Window::Window(){ process = new QProcess(this); connect(process, SIGNAL(readyReadStandardError()), this, SLOT(output())); process->start("messege.exe"); process->waitForReadyRead(); process->waitForFinished();}void Window::output(){}
Window::Window{but1 = new QPushButton;but2 = new QPushButton; connect(but1,SIGNAL(clicked()),this, SLOT(sendMess1())); connect(but2,SIGNAL(clicked()),this, SLOT(sendMess2()));}void Window::sendMess1(){ qDebug()<<0;}void Window::sendMess2(){ qDebug()<<1;}
Window::Window(){ process = new QProcess(this); connect(process, SIGNAL(readyReadStandardError()), this, SLOT(output())); process->start("messege.exe"); process->waitForReadyRead(100000); //ждет данные, посылаемые при клике на кнопку }void Window::output(){}