Hi!
I first posted this question in the qtforum.org and was asked to also post it here. Link to the thread.
I have qtgui that uses a lot of classes that dont use qt. In those classes there are a lot of printf. I need to redirect them form the console to a QTextEdit or some sort of component in my gui for example one of these:
. I cant change the printfs since its not my code and there could be a lot of them hidden.
I have tried the class in this thread
and it works great for std::cout but not for printf and there is also seems to be some issues when using threaded classes.
I guess I have to pipe the stdout in some way but I haven't a clue on how to do it.
Would really appriciate any help I could get.
There is some code that might help in understanding what I want to do in the original post.
The q_debugstream.h is here:
[Edit] Forgot to say, it's windows
Bookmarks