Qt iterate over rich text document
Unsolved
General and Desktop
-
Hi, I need to iterate over QTextDocument and for each block I need to know absolute position of top left corner of a block relative to document (in pixels): Is there any way?
-
something like this for each TextBlocks
-
The offical documentation says something about QTextBlock or QTextFragment positions like this
https://doc.qt.io/qt-5/qtextfragment.html#position
but as far as I understand this is not what I'm looking for, because these functions return int instead of QPoint or QPointF -
What about https://doc.qt.io/qt-5/qabstracttextdocumentlayout.html#blockBoundingRect ?
Get the layout from https://doc.qt.io/qt-5/qtextdocument.html#documentLayout