Is there a way to implement a "stdout" type of widget in Qt, e.g., a textbox type window that either printf() output would go to (like a terminal) or sprintf() character buffers?