I have created an object using QGraphicsObject as Base class, in this object's paint function i am using painter->drawText() function to draw a text at a particular coordinate..... The text gets updated only when i do some mouse action inside QGraphicsView Widget or outside the application......if i put a timer and constantly trying to update text , its not getting updates......
I need to be able to update Text with timer also.....any help is appreciated
Here is my code for paint function
void Text_Display:aint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
painter->setFont(font);
painter->setPen(pen);
painter->drawText(pos.x(),pos.y(),text);
}
-> Paint function is being called repeatatly and text variable is getting updated too , only thing is it's not getting updated on screen
Bookmarks