Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QLabel sizeHint without images
VRonin last edited by
I have a problem regarding QLabel. I rely on sizeHint() to determine the preferred height of a QLabel with word warp enabled. The problem comes when I try to add image tags (like <img >) to the text. the sizeHint().height() explodes to more than twice the actual required space.
How can I compute a real measure of the sizehint disregarding img tags?