QGraphicsTextItem: document that adjustSize can center/right align text
Unlike QTextEdit, there's no implicit width for a QGraphicsTextItem, meaning any rich text that is supposed to be centered or right aligned will not be unless the user explicitly sets the width. There's also another possibility: calling adjustSize() manually. Document that. Task-number: QTBUG-312 Change-Id: I83023269f4c63643e8224887efe2143dd1bb1908 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit is contained in:
parent
f79d96b486
commit
24a94ab833
@ -9791,6 +9791,7 @@ QVariant QGraphicsPixmapItem::extension(const QVariant &variant) const
|
||||
using textWidth().
|
||||
|
||||
\note In order to align HTML text in the center, the item's text width must be set.
|
||||
Otherwise, you can call adjustSize() after setting the item's text.
|
||||
|
||||
\image graphicsview-textitem.png
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user