I have often wanted to use QTextEdit as a quick means of displaying what is being written to a stream. That is, rather than writing to QTextStream out(stdout), I want to do something like:
QTextEdit qte;
QTextStream out(qte);
I could do something similar if I emit a signal after writing to a QTextStream
attached to a QString.
The problem is that I want the interface to be the
same as it would if I were streaming to stdout
etc.:
out << some data << endl;
Any ideas on how I might accomplish this?
Thanks in advance.