我怎么能够自动滚屏到我的底部QTextEdit
在我的 GUI 初始化函数中
self.mytext = QTextEdit()
self.cursor = QTextCursor(self.mytext.document())
self.mytext.setTextCursor(self.cursor)
以及我如何在另一个函数中添加它
self.cursor.insertText(str(self.user) + ": " + str(self.line.text()) + "\n")
moveCursor http://doc.qt.nokia.com/latest/qtextedit.html#moveCursor方法应该做到这一点。例如。:
self.mytext.moveCursor(QtGui.QTextCursor.End)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)