1 Attachment(s)
Insert some text in external exe file.
I am using qt creator to make UI. I created the push button which i can run external exe file buy clicking, and also i have second push button. I want to insert text "gogo1" in the external exe file using second push button clicked. The external exe program looks like cmd. Can anyone help me?
This is my code for first push button to run external program
void MainWindow::on_pushButton_8_clicked()
{
QProcess *process = new QProcess(this);
QString file("D:\\Python_practice\\proto4\\Surface Evolver Code\\F_Passive_for_UI.fe");
process->execute(file);
//process->start(file);
QDesktopServices::openUrl(QUrl("file:///"+file,QUrl::TolerantMode));
}
and for second push button.
void MainWindow::on_pushButton_9_clicked()
{
}
This is the portion of external exe program. Please click to see the image
Attachment 13207
Re: Insert some text in external exe file.
From QProcess doc : QProcess allows you to treat a process as a sequential I/O device. You can write to and read from the process just as you would access a network connection using QTcpSocket. You can then write to the process's standard input by calling write(), and read the standard output by calling read(), readLine(), and getChar().