QTextEdit: scrolling past the last line

I display rich text content using a subclass of QTextEdit .

Some editors, especially code and IDE editors, provide the ability to scroll past the last line until the last line hits the top of the view.

I would like to do the same using QTextEdit . Is it possible? I read the document, but could not find anything.

Thanks.

+4
source share
1 answer

I never used QTextEdit this way, but maybe you can solve your problem with scrollToAnchor (QString arg) (which ensures that the "arg" presented in the text is visible) or ensureCursorVisible () .

0
source

Source: https://habr.com/ru/post/1501393/


All Articles