I want to render linenumbers to the left of a QTextEdit; not just simple single font situation, but when there is a mix of fonts. So how do I calculate the height for each line of HTML text; where to place a QLabel with the line number ?
I thought of finding the height of the biggest char/font item used in a line of HTML text. Something like
qreal lineheight_line3 = lineHeightfromHTML( QString( "<h1>Hello</h1><p font="Verdena" size=8>world</p>" );
Or better something that returns an array of all fonts used per line, which then could be inspected with QFontMetric. But actually I already fail to find the api function that can give me individual lines of a QTextEdit, not just the plain text.
Thanks in advance,
Mu
Bookmarks