From 8ec23b298e338e6005b7a4d12480cc06a38ec03e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Fri, 17 Sep 2010 17:14:53 +0200 Subject: [PATCH 1/1] auto scroll log --- sface/logwindow.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sface/logwindow.py b/sface/logwindow.py index a77eab2..c5c41dd 100644 --- a/sface/logwindow.py +++ b/sface/logwindow.py @@ -24,6 +24,7 @@ class LogWindow(QDialog): QWidget.__init__(self, parent) self.setWindowTitle("SFI Log") self.text = QTextBrowser(self) + self.text.ensureCursorVisible() layout = QVBoxLayout() layout.addWidget(self.text) @@ -40,6 +41,9 @@ class LogWindow(QDialog): def update(self): self.text.setText(self.logio.getText()) + c = self.text.textCursor() + c.movePosition(QTextCursor.End) + self.text.setTextCursor(c) -- 2.43.0