Logo Search packages:      
Sourcecode: qt4-x11 version File versions

void QGraphicsTextItem::paint ( QPainter painter,
const QStyleOptionGraphicsItem option,
QWidget widget 
) [virtual]

This function, which is usually called by QGraphicsView, paints the contents of an item in local coordinates.

Reimplement this function in a QGraphicsItem subclass to provide the item's painting implementation, using painter. The option parameter provides style options for the item, such as its state, exposed area and its level-of-detail hints. The widget argument is optional. If provided, it points to the widget that is being painted on; otherwise, it is 0. For cached painting, widget is always 0.

doc/src/snippets/code/src.gui.graphicsview.qgraphicsitem.cpp 10

The painter's pen is 0-width by default, and its pen is initialized to the QPalette::Text brush from the paint device's palette. The brush is initialized to QPalette::Window.

All painting is done in local coordinates.

See also:

Implements QGraphicsItem.

Generated by  Doxygen 1.6.0   Back to index