Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |
The QGraphicsSimpleTextItem class provides a text item that you can add to a QGraphicsScene. More...
#include <QGraphicsSimpleTextItem>
Inherits QAbstractGraphicsShapeItem.
This class was introduced in Qt 4.2.
The QGraphicsSimpleTextItem class provides a text item that you can add to a QGraphicsScene.
To set the item's text, pass a QString to QGraphicsSimpleTextItem's constructor, or call setText().
QGraphicsTextItem uses the text's formatted size and the associated font to provide a reasonable implementation of boundingRect(), shape(), and contains(). You can set the font by calling setFont().
QGraphicsSimpleText does not display rich text. It is optimized for drawing plain text fast and with low memory overhead.
See also QGraphicsTextItem, QGraphicsPathItem, QGraphicsRectItem, QGraphicsEllipseItem, QGraphicsPixmapItem, QGraphicsPolygonItem, QGraphicsLineItem, and The Graphics View Framework.
Constructs a QGraphicsSimpleTextItem.
parent and scene are passed to QGraphicsItem's constructor.
Constructs a QGraphicsSimpleTextItem, using text as the default plain text.
parent and scene are passed to QGraphicsItem's constructor.
Destroys the QGraphicsSimpleTextItem.
Returns the font that is used to draw the item's text.
See also setFont().
Sets the font that is used to draw the item's text to font.
See also font().
Sets the item's text to text. The text will be displayed as plain text. Newline characters ('\n') as well as characters of type QChar::LineSeparator will cause item to break the text into multiple lines.
See also text().
Returns the item's text.
See also setText().
Copyright © 2007 Trolltech | Trademarks | Qt 4.2.3 |