Given a text block, is there a way to determine its offset relative to the coordinates (0, 0)
of the current document layout?
For example, suppose I have a QPlainTextEdit
with the following contents:
Line 1 Line 2
If the height of each line is 17px
, how can I get the offset of line 2? Since line 1 is at the top, it should be 0px
from the top and line 2 should be 17px
from the top.
I tried a number of different functions but none of them seems to have the information:
None of these methods seem to work.