How to get a QTextBlock bounding QRectF from a QTextEdit
Solved
General and Desktop
-
I want to create a QTextEdit widget that supports line numbers and I need something to find a QRectF so I can calculate line number positions
Basic Info
- I have Qt 5.11
- I am using KDE Neon
-
With QTextBlock it is not possible. Just see if you can do some thing by taking QTextLine. Have not tried myself.
-
@Nite-Coder
take a look at the Codeeditor example
It uses a QPlainTextEdit though, which provides QPlainTextEdit::blockBoundingRect()