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):

Qt Code:
  1. void proves::execapp(){
  2.  
  3. QStringList argo,list;
  4. QProcess * exec;
  5. exec =new QProcess(this);
  6.  
  7. argo <<"/opt/calibrate.sh";
  8. list <<"PATH=/opt:/opt/p:/bin:";
  9.  
  10. exec->setEnvironment(list);
  11. exec->start("/bin/sh", argo);
  12. }
To copy to clipboard, switch view to plain text mode 

but it don't works...

What's wrong??


Thanks