Executing application several time from the shell script file ...[SOLVED]
-
wrote on 11 Nov 2014, 05:41 last edited by
Hi All,
I have developed an application in QT and Sqlite. I have to pass several parameters to it by command line like
@
./myApplication -p1 Au,2,C,2 -p1 2,3 -p3 0.25,0.5 -p4 0.25 ...... soon
@I have to run it thousand of time. Doing this manually is tedious.
So to execute my application I have crated shell script file to execute it from terminal on Linux (ubuntu) to run application several time.@
#!/bin/bashclear
echo Start
./myApplication -f Au,8,C,18,H,15,N,2,O,6 -z 2,3 -d 0.25,0.1 -a 0.25
echo 1
./myApplication -f Au,9,C,56,H,56,P,11,F,18 -z 2,3 -d 0.25,0.1 -a 0.25
echo 2
./myApplication -f Au,9,C,56,H,56,P,8,B,3,F,12 -z 2,3 -d 0.25,0.1 -a 0.25
echo End
@The Problem is after execution first time it STOP there and never close (return a.exec). How to close the application once it's done. So that it will run the 2nd, 3rd ... time. I have try a.closeAllWindows() a.quit() but nothing works.
Thanks
Manoj -
wrote on 11 Nov 2014, 09:40 last edited by
Can you show some code? I guess there is something wrong with it and QApplication::exec() maybe never returns..
-
wrote on 11 Nov 2014, 12:34 last edited by
Hi Binary91,
Thanks Binary91 ... My application code is large any how I have fixed this issue by creating the signal/slot. Once my application done with the all computation will emit signal to close in the slot like this@
void ResolutionCalculationBS::handleCloseAll(bool flag)
{
if(flag){
//QApplication::aboutToQuit();
QApplication::quit();
QApplication::exec();
}//end if
}//end handleCloseAll
@This works fine for me. I think application event loop is ON so i have to kill it forcefully. It may not be the best solution, but in my case it works :).
Thanks
-
wrote on 11 Nov 2014, 16:31 last edited by
Ok.
If you're fine with that solution, you can update thread title prepending [SOLVED], so everyone knows that this topic doesn't need attention anymore... -
wrote on 12 Nov 2014, 04:13 last edited by
OK Done
1/5