Qt Code:
  1. /* virtual */ const unsigned int ZeInfoItem::UpdateHeight(const unsigned int width)
  2. {
  3. QTextDocument document;
  4. document.setHtml(mTextComponent.getText());
  5. document.setTextWidth(width);
  6.  
  7. mHeight = document.size().height();
  8. return mHeight;
  9. }
To copy to clipboard, switch view to plain text mode 

Here is a function to retrieve the height of an HTML text bounding rectangle.
Unfortunately it's quite slow, when called repetitively.

Do you have a better solution ?
Thanks.