[PySide] auto scrolling QTextEdit
Frank Rueter | OHUfx
frank at ohufx.com
Fri Oct 20 06:17:38 CEST 2017
HI guys,
been really quiet in here, hopefully this channel is still used.
Quick question:
I am using a QTextEdit ti print output from an external process which is
run via QProcess.
However, QTextEdit does nto auto-scroll when the output fills up the
widget.
Based on info I found online I put this code together in the slot that
feeds the stdout to my widget:
cursor = self.outputWidget.textCursor()
cursor.movePosition(cursor.End)
cursor.insertText(unicode(self.process.readAll()))
# trying to auto-scroll but tit won't work:
sb = self.outputWidget.verticalScrollBar()
sb.setValue(sb.maximum())
self.outputWidget.ensureCursorVisible()
Can somebody help please?
Cheers,
frank
--
ohufxLogo 50x50 <http://www.ohufx.com> *vfx compositing
<http://ohufx.com/index.php/vfx-compositing> | *workflow customisation
and consulting <http://ohufx.com/index.php/vfx-customising>* *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20171020/de4041d9/attachment.html>
More information about the PySide
mailing list