PDA

View Full Version : QProcess Question



Vash5556
25th February 2007, 02:10
As one of my programs I decided to work upon I am using QProcess to interface with scp to upload files to my server. As the program stands right now, I can upload files to the server because I do not need a password to log in. I was wondering how would I check to see if QProcess is sitting there waiting for me to enter a password, and how would i go about sending a password to the process so that it could continue executing. Thanks in advance for the help.

-Vash

kernel_panic
26th February 2007, 16:24
you can read out the qprocess with a slot using this signal:

readyReadStandardError ();
in your slot, which is called if the signal above was fired
you read the stdout and look if theres a question for a password.
and then write on the qprocess's stdin with


QProcess proc;
proc.write(password);

good luck