I was just following this topic "How to print to console when using Qt" in order to make my application work. I started to wonder- Is it possible to subscribe more outputs to a single QTextStream
? For example, lets say when I wrote something to my QTextStream object, I want the string to be printed to stdout and a specified file as well. Would this be possible?
I would appreciate all help.
Edit: To be more exact, I am trying to find an optimal way to send a stream either to stdout, file or file + stdout. I dont want to copy data more times that I need to. Sany hints of how to achieve this?