PDA

View Full Version : reading fprintf statements from console in qt



KrishnaKishan
15th March 2007, 07:06
Hi,
we have many fprintf statements in our project written in a c function. This c function is getting called by qt class. So the fprintf statements coming in console should be read line by line and show in QTextEdit in append mode. We are not using QProcess also, just calling a c function having many fprintf statements.
Pls suggest me how can i read the each fprintf statement once it is written to console and the same text should be shown in QTextEdit in our project?

wysota
15th March 2007, 07:12
The only idea I have is to substitute fprintf with another method that'll write to a string.

high_flyer
15th March 2007, 11:00
We are not using QProcess also, just calling a c function having many fprintf statements.
Why don't/can't you use QProcess?