Problem with function that redirects std::cout to QTextEdit
I found this old Qt forum post that outlines a function to redirect std::cout to a QTextEdit.
However, I found that if you have something like the following, it doesn't redirect the variable value (unless you recast explictly to a string) and so in the textbox all you get is "Test".
int i = 0 ;
std::cout << "Test" << i << std:endl ;
Any ideas why it isn't redirecting the variable value?
I am aware there is an older incarnation of this idea here,
and that works perfectly. But obviously it is more inefficient.