Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
4.8.2
-
None
-
Windows 7 x64
Description
I cant get correct size of QStaticText. I have text that is layout into several lines and have known width of text item on the screen, that is smaller than width of the whole text.
Investigating this issue i found that call of QTextDocument::adjustSize() at qstatictext.cpp:664 in QStaticTextPrivate::paintText function, changes size of corresponding QTextDocument used to layout text for QStaticText. So i always get adjusted size, that is not react on QStaticText::setTextWidth changes.
I have tested same code without call of QTextDocument::adjustSize(), and its work fine.
In attached files for text is used QStaticText and red line display height of QStaticText.