Results 1 to 5 of 5

Thread: QProcess StdErr signal question

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QProcess StdErr signal question

    Im using QProcess (Qt 4.5) to access console (cmd.exe ) in Windows XP.
    Is has properly connected stdout/stderr/terminate signals.

    When i send something to its write channel it seems to work correctly. CMD responds as it sholud (for ex: dir command,). Im able to read output from stdout channel (result: directory list).
    The problem is when i send some garbage (for ex "aksfvakhv"). Console program sends proper stderr output text ("Command not found" or something) and then it terminates! So I need to restart it again. I tried it with another console program and it behaves the same way.

    Im using readAllStandardError() to do read stderr channel.
    Process sends terminate signal (ExitStatus: NormalExit).

    Qt Code:
    1. void JGI::readStdError()
    2. {
    3. QByteArray errbuffer=cmdProc->readAllStandardError();
    4. ui->cmdStdError->setText(QString::fromLocal8Bit(errbuffer));
    5. }
    To copy to clipboard, switch view to plain text mode 

    Whats wrong?

    Signals are connected properly. Checked n times.
    Last edited by devx; 25th November 2009 at 14:48.

Similar Threads

  1. question on QProcess
    By wagmare in forum Qt Programming
    Replies: 3
    Last Post: 17th January 2009, 07:23
  2. pthread instead QThread
    By brevleq in forum Qt Programming
    Replies: 8
    Last Post: 23rd December 2008, 07:16
  3. Connection of custon signals/slots
    By brevleq in forum Qt Programming
    Replies: 2
    Last Post: 23rd December 2008, 07:04
  4. QProcess object not emitting finished(int) signal
    By Tiansen in forum Qt Programming
    Replies: 13
    Last Post: 14th November 2008, 12:17
  5. QProcess question
    By lni in forum Qt Programming
    Replies: 3
    Last Post: 19th July 2007, 19:06

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.