View Full Version : problem in QProcess eadAllStandardOutput()

13th December 2008, 11:54
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 ...


13th December 2008, 12:14
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.

13th December 2008, 13:03
thanks for reply this is my code snippet

connect(captureButton, SIGNAL(clicked()),this,SLOT(newPorting()));

in newPorting()

<script type="text/c++Script">
QString program = "./test_ftrapi";
proc = new QProcess(this);
connect(proc, SIGNAL(readyReadStandardOutput()), this, SLOT(readFromStdout()));
proc->start(program, arguments);

in readFromStdout()


please help