I use QGraphicsView, QGrapichsScene and QGraphicsItem for drawing some charts. I have implemented QGraphicsItem::paint function for drawing text (values of charts), but it is not being called every time that is must draw something new. My paint function
void CLabelItem::paint(QPainter *painter,
const QStyleOptionGraphicsItem* /*option*/, QWidget* /*widget = 0*/)
{
if ( GetValue() < 0 )
{
return;
}
painter->drawText(boundingRect(), m_value.toString());
}
So my question is - why QGraphicsItem::paint can be not called and how may I make it to be called?