yes yes, the script is in /opt/
yes yes, the script is in /opt/
But what the current working directory is? Did you explicitly set it to /opt? What happens if you call the script as /opt/script.sh instead of ./script.sh?
If i put next code:
void proves::execapp(){
QStringList argo,list;
argo.clear();
list.clear();
QProcess * exec;
exec =new QProcess(this);
list <<"PATH=/usr/bin/:/bin/:/opt/:/opt/p/:";
exec->setEnvironment(list);
exec->start("/opt/calibrate.sh");
}
the results are worse, don't appear new PIDs
You forgot to start sh.
Qt Code:
To copy to clipboard, switch view to plain text mode
I found the solution....
the code was correct in all cases.
in the code i added this line:
exec->setProcessChannelMode(QProcess::ForwardedChannels );
Then, when i press the button, in the terminal out the next line:
TS_OPEN: not such file name.
TS_OPEN is internal function of TS_LIB, libray of touchScreen control. This function need the specific device of touchScreen.
To solve this, i added the variable TSLIB_TSDEVICE in environment ---> QStringList list <<"PATH=/opt:/opt/p:/usr/bin:/bin:/sbin:/usr/local/bin:/usr/etc:"<<"TSLIB_TSDEVICE=/dev/input/event1";
that's all
thanks for your time
Bookmarks