From: Barış Metin Date: Fri, 17 Sep 2010 15:14:53 +0000 (+0200) Subject: auto scroll log X-Git-Tag: sface-0.1-1~8^2^2 X-Git-Url: http://git.onelab.eu/?p=sface.git;a=commitdiff_plain;h=8ec23b298e338e6005b7a4d12480cc06a38ec03e;hp=08264e3523d39d7dc843c3a96a0a2849c6eb8a49 auto scroll log --- 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)