Issue
How can I auto scroll for the scroll area? For example, when there is a new update instead of the view of the scroll area staying the same, I want to go down with the new text. Think of it as in a CMD console, when you type a command it autoscroll with the output.
Solution
Use QTextEdit.moveCursor
to set the location you want to scroll to, and then use QTextEdit.ensureCursorVisible
to scroll to it:
textedit.moveCursor(QtGui.QTextCursor.End)
textedit.ensureCursorVisible()
Answered By - ekhumoro
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.