Results 1 to 2 of 2

Thread: QProcess Question

  1. #1
    Join Date
    Sep 2006
    Posts
    13
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QProcess Question

    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

  2. #2
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QProcess Question

    you can read out the qprocess with a slot using this signal:
    Qt Code:
    1. readyReadStandardError ();
    To copy to clipboard, switch view to plain text mode 
    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
    Qt Code:
    1. QProcess proc;
    2. proc.write(password);
    To copy to clipboard, switch view to plain text mode 
    good luck

Similar Threads

  1. QProcess & linux shell characters
    By Ti_Thom in forum Qt Programming
    Replies: 4
    Last Post: 21st December 2009, 10:01
  2. use qprocess like shellexecute
    By kernel_panic in forum Qt Programming
    Replies: 7
    Last Post: 19th February 2007, 15:51
  3. Quoting problem with QProcess
    By the_bis in forum Qt Programming
    Replies: 1
    Last Post: 15th December 2006, 11:24
  4. problem with qprocess
    By deekayt in forum Qt Programming
    Replies: 2
    Last Post: 13th June 2006, 13:30
  5. QProcess in a QThread
    By chombium in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2006, 15:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.