Hello!
I'm trying to execute a script in a QT aplication.
The shell is "sh" and the script is "calibrate.sh". (this script calibrates the touchscreen of embeeded linux device).
In the terminal the script works using the next command:
----> root@device /opt$ sh calibrate.sh
The code used is this, the function is a public slot (this slot is called when you push a QPushButton):
void proves::execapp(){
argo <<"/opt/calibrate.sh";
list <<"PATH=/opt:/opt/p:/bin:";
exec->setEnvironment(list);
exec->start("/bin/sh", argo);
}
void proves::execapp(){
QStringList argo,list;
QProcess * exec;
exec =new QProcess(this);
argo <<"/opt/calibrate.sh";
list <<"PATH=/opt:/opt/p:/bin:";
exec->setEnvironment(list);
exec->start("/bin/sh", argo);
}
To copy to clipboard, switch view to plain text mode
but it don't works...
What's wrong??
Thanks
Bookmarks