Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
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!