Results 1 to 3 of 3

Thread: problem in QProcess eadAllStandardOutput()

  1. #1
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question problem in QProcess eadAllStandardOutput()

    hi friends/experts,

    i am running another program (ex: fps.c) inside my qt application by QProcess() , that program is a device handler so i run that "fps.c "program with my qt application .

    that device is a finger print scanner so first i get the output from fps.c as "device ready and then put the finger"
    after that i put my finger it fps.out shows again output as "image scanned and saved as" .....
    this is the usual running of "fps.c"


    when i use this program run the output of fps.c through QProcess in my Qt app and using signal readyReadStandardOutput() i get the output and displaying that in a label by using readAllStandardOutput() ... this is my plan

    but the label shows output as "device ready" "put the finger" "image scanned and saved as" after i scanned my finger then only i can get the output but its not coming as per order as "device ready and then put the finger"
    i will scan my finger then displaying "image scanned and saved as.."

    why its not coming like that how can i solve that .... please help me ...

    --

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: problem in QProcess eadAllStandardOutput()

    Make sure that the output is not written to stderr instead.
    Show us the code where you create your QProcess and attach to its signals.

  3. #3
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Unhappy Re: problem in QProcess eadAllStandardOutput()

    thanks for reply this is my code snippet

    Qt Code:
    1. connect(captureButton, SIGNAL(clicked()),this,SLOT(newPorting()));
    To copy to clipboard, switch view to plain text mode 

    in newPorting()
    Qt Code:
    1. <script type="text/c++Script">
    2. QString program = "./test_ftrapi";
    3. proc = new QProcess(this);
    4. connect(proc, SIGNAL(readyReadStandardOutput()), this, SLOT(readFromStdout()));
    5. proc->start(program, arguments);
    6. </script>
    To copy to clipboard, switch view to plain text mode 

    in readFromStdout()
    Qt Code:
    1. msgtextEdit->setText(proc->readAllStandardOutput());
    To copy to clipboard, switch view to plain text mode 


    please help

Similar Threads

  1. QProcess problem
    By Mystical Groovy in forum Qt Programming
    Replies: 2
    Last Post: 2nd December 2008, 20:07
  2. QProcess problem (Main program hangs)
    By sincnarf in forum Qt Programming
    Replies: 5
    Last Post: 11th October 2007, 09:26
  3. QThread and QProcess problem
    By codebehind in forum Qt Programming
    Replies: 13
    Last Post: 7th August 2007, 08:11
  4. Quoting problem with QProcess
    By the_bis in forum Qt Programming
    Replies: 1
    Last Post: 15th December 2006, 11:24
  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.