[Qt-interest] redirect stdout to QTextEdit widget
David Boddie
david.boddie at nokia.com
Mon Feb 16 21:06:56 CET 2009
NARCISO, Rui wrote:
> I would to redirect the standard output to a QTextEdit but I would like it
> to be dynamic, ie, as soon as something is printed to the stdout the
> contents of QTextEdit should be updated..
>
> Changing the output of the ocde I'm running directly to the QTextEdit is
> not an option.
>
> I have tried to do it by reassigning the sys.stdout file descriptor but
> I'm encountering "memory fault" errors when trying to write to the
> QtextEdit.
>
> Would anyone have a webpage or some code I could use?
Someone provided an answer to your question here:
http://www.riverbankcomputing.com/pipermail/pyqt/2009-February/022024.html
Was there something wrong with their code?
David
--
David Boddie
Senior Technical Writer
Nokia, Qt Software
More information about the Qt-interest-old
mailing list