onamatic
4th August 2011, 15:40
Linux / Qt4.6.3
I want to run a shell script which I've placed in a .qrc resource.
...
QProcess qp;
QString script(":/scripts/findttyusb.sh"); //<-- qp.waitForFinished() returns false (error)
QString script("/root/Projects/UT804/UT804/scripts/findttyusb.sh"); //<--- works fine
QProcess::
qp.start(script);
if (qp.waitForFinished()){
if (qp.exitCode() == 0){
QByteArray result = qp.readAll();
...
Do I have to explicitly get the script out of the qrc, create a file and then execute it - or is there a really easy way to do this?
Thanks for any thoughts.
I want to run a shell script which I've placed in a .qrc resource.
...
QProcess qp;
QString script(":/scripts/findttyusb.sh"); //<-- qp.waitForFinished() returns false (error)
QString script("/root/Projects/UT804/UT804/scripts/findttyusb.sh"); //<--- works fine
QProcess::
qp.start(script);
if (qp.waitForFinished()){
if (qp.exitCode() == 0){
QByteArray result = qp.readAll();
...
Do I have to explicitly get the script out of the qrc, create a file and then execute it - or is there a really easy way to do this?
Thanks for any thoughts.