Using run.sh from another program (Qt)
Posted: Tue Mar 24, 2015 3:07 pm
Hi,
I want to use the run.sh 'IP' command from a GUI.
I work with Qt and made a button, which will start a subprocess:
Output is:
But neither "trig-aqui.o" nor "api_test" is in the dir, as it is usually after running the run.sh script from the shell.
Does anybody have an idea?
Tanks in advance
Graf Zahl
I want to use the run.sh 'IP' command from a GUI.
I work with Qt and made a button, which will start a subprocess:
Code: Select all
void MainWindow::CompileAndTransfer()
{
QProcess *compAndtrans;
compAndtrans = new QProcess(this);
compAndtrans->setWorkingDirectory("/home/username/RedPitaya/SDK/");
compAndtrans->start("./run.sh 'IP'");
compAndtrans->waitForFinished();
QString strOut = compAndtrans->readAllStandardOutput();
qDebug() << strOut;
}
Code: Select all
"make: Entering directory `/home/molsyst/RedPitaya/SDK/src'
rm -f api_test *.o ~*
make: Leaving directory `/home/molsyst/RedPitaya/SDK/src'
make: Entering directory `/home/molsyst/RedPitaya/SDK/src'
arm-linux-gnueabi-gcc -c -g -std=gnu99 -Wall -Werror -I ../include/ trig-aqui.c -o trig-aqui.o
make: Leaving directory `/home/molsyst/RedPitaya/SDK/src'
"
Does anybody have an idea?
Tanks in advance
Graf Zahl