Results 1 to 8 of 8

Thread: readLine in QProcess

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2009
    Location
    Mantova, Italy
    Posts
    15
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default readLine in QProcess

    Hi to all.
    I'm developing a small program that get some info from a command line tool (clt) and elaborate it.

    I'm using QProcess to start the clt and the signal readyReadStandardOutput() to execute the functin that read the std out of the clt.

    it works but don't read the last line.

    For example, if the clt write to out:

    first pass ok
    second pass ok
    third pass failed
    4th pass ok
    5th pass failed

    and the gui slot connected to readyReadStandardOutput is

    f(){
    QString strOut=Process->readLine();
    QMessageBox::information(this,"aaa",strOut);
    }

    the program show only 4 pupups with the first 4 lines(the popup with "5th pass failed" is not showed) .
    sometimes, there is a pause of 3-4 seconds between various output lines from the clt because some times it use the network to do the job.

    i'm doing someting wrong?

    Thanks for help, and sorry for english...


    EDIT: using qt 4.5.2 on windows xp
    Last edited by grisson; 14th October 2009 at 15:09.

Similar Threads

  1. Detect First QProcess finished in a group and kill other
    By Davidaino in forum Qt Programming
    Replies: 3
    Last Post: 11th July 2008, 12:53
  2. QProcess exitStatus()
    By user_mail07 in forum Qt Programming
    Replies: 2
    Last Post: 12th June 2008, 20:51
  3. QProcess and Pipes
    By KaptainKarl in forum Qt Programming
    Replies: 1
    Last Post: 9th April 2007, 23:11
  4. QProcess extremely slow on Windows?
    By Pepe in forum Qt Programming
    Replies: 2
    Last Post: 26th March 2007, 00:25
  5. problem with qprocess
    By deekayt in forum Qt Programming
    Replies: 2
    Last Post: 13th June 2006, 13:30

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
  •  
Qt is a trademark of The Qt Company.