Hi all,

I'm having problem in running shell script file with password parameter in linux. I can run the sh file without password parameter like this:

Qt Code:
  1. process->start("sh", QStringList() << "shellscript.sh");
To copy to clipboard, switch view to plain text mode 

This works fine. But this time, i want to run this command:

Qt Code:
  1. echo mypassword | sudo -S sh shellscript.sh
To copy to clipboard, switch view to plain text mode 

This works fine in terminal..

I have no idea on how to run this in QProcess..
Any response would be very much appreciated..

thanks..