How to repaint QDeclarativeItem?



  • Hi, i'm creating a qml widget in c++, i've overrided the paint method like this:
    @void MyItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *widget){
    painter->drawImage(0, 0, _qImage.scaledToWidth(this->width()));
    }@
    inside MyItem i've a timer that changes the image, how can i force the repainting of the item at every timer event?



  • ok i've to call update() every time i need a repaint!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.