Qt Code:
/* virtual */ const unsigned int ZeInfoItem::UpdateHeight(const unsigned int width) { QTextDocument document; document.setHtml(mTextComponent.getText()); document.setTextWidth(width); mHeight = document.size().height(); return mHeight; }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.
Bookmarks