kralyk
kralyk

Reputation: 4397

QTextEdit: scroll beyond last line

I display some rich text contents using a subclass of QTextEdit.

Some editors - especially code editors & IDEs offer a possibility to scroll beyond the last line all the way until the last line gets to the top of the view.

I'd love to be able to do the same thing using QTextEdit. Is this somehow possible? I've been reading the doc but could not find anything.

Thank you.

Upvotes: 5

Views: 708

Answers (1)

ismaelrs
ismaelrs

Reputation: 112

I never had used QTextEdit that way, but maybe you can solve your problem with scrollToAnchor(QString arg) (which ensure the 'arg' presented in text will be visible), or ensureCursorVisible().

Upvotes: 0

Related Questions