根据Qt文档,"void QGraphicsItem::update ( const QRectF & rect = QRectF() ) "不会立即进行绘制,而是在控制达到事件循环后由QGraphicsView处理绘制请求。以下是我的代码:
this->item->setPixmap( QPixmap::fromImage(*coloration->image) );// QGraphicsPixmapItem
this->item->update();
this->scene->update(); // QGraphicsScene
this->view->update(); // QGraphicsView
代码在一个每100毫秒调用一次的方法中(并且其中颜色- > 图像将会改变),但是Qt拒绝每100毫秒更新图像,它只呈现最终图像。那么,我该如何立即绘制该项?