I have a program written in C# (.net framework 4.0) and i have a main program written in Qt C++, i need to run this program (C# program) from my main program, the problem is if i use QProcess to run it, nothing happens, i used waitForStarted and waitForFinished members functions of Qprocess but already timeout.
I tried Qprocess (start()), system(). Here is what i tried:
QProcess p;
p.start(qApp->applicationDirPath()+"/control.exe",{"0000"},QIODevice::ReadWrite);
p.waitForFinished();
QFile fff(qApp->applicationDirPath()+"/control.csv");
if(!fff.exists())
{
/*Error control.csv not exists*/
}
control.exe extracts data from a datagridView and store it in control.csv file, but the csv file is not created while control.exe works perfectly when i run it from windows console. How can i run it from Qt C++ program?
PS: my C# program is a console application.
Thank for helping me.
After effort and perseverance, I managed to find the problem. This line had to be changed
By this one
I already run it using QProcess object in Qt.
Indeed, I must specify the whole path using
System.AppDomain.CurrentDomain.BaseDirectorywhere to store control.csv file, I thought it will be created near the C# program.I noticed one think, the program is extremly slow to find the automationElement object, it takes more than 20 seconds.