我需要一点帮助。在
我有一个QTextBrowser,在这里我将所有stdout重定向到它。在
self.console_window = QtGui.QTextBrowser()
self.console_window.setReadOnly(True)
我现在需要的是自动滚动到底部,这样我就可以看到发生了什么,而不需要手动滚动到底部。在
我试过了
^{pr2}$但不起作用。在
有什么想法吗?在
已修复!!!
def handleOutput(self, text, stdout):
self.console_window.moveCursor(QtGui.QTextCursor.End)
self.console_window.ensureCursorVisible()
self.console_window.insertPlainText(text)
def Console_Window(self):
self.console_window = QtGui.QTextEdit()
self.console_window.setReadOnly(True)
只是Pyqt5中的一个快速更新。在
我的做法有点不同,因为我发现需要延迟:
相关问题 更多 >
编程相关推荐