I have many pop-up information panels (QLabels) with text (QStrings). I set the Label width myself, and use QFontMetrics to determine the height.

I've been using "\n" in places where I want to insert a line break. No problem, QFontMetrics handles this fine. I've just discovered that I can use HTML tags (i.e. <b> <i> <font size="+1"> <br>) to modify the text. Unfortunately, "\n" and the HTML tags are not compatable. For a given string, if "\n" appears first, then the HTML tags won't work... and vice-versa.

I could use <br> instead of "\n" for my line breaks... but when I do this, QFontMetrics doesn't pick up on it and my text gets cut-off at the bottom of the Label. Easy fix? (besides counting the number of <br>'s in a given text string and adding that to the QLabel's height. If I have to do something like this: I do I determine the height of a single <br>?)

...or... is there another syntax/tag I can use besides HTML that would work better?

thanks