Hi,

I have already enabled updates for the graphicsView, set cacheBackground as the mode for updating the gview. I need to change the background color. WHen I set the colour and invoke update/repaint for the view or viewport nothing happens. When I invoke "fitInView(..sceneRect)" the background is repainted.
How to update the background using update/repaint/etc ?
My view settings:
Qt Code:
  1. ...
  2. m_view->setCacheMode(QGraphicsView::CacheBackground);
  3. m_view->setOptimizationFlag(QGraphicsView::DontClipPainter);
  4. m_view->setOptimizationFlag(QGraphicsView::DontSavePainterState);
  5. m_view->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
  6. m_view->setRenderHints( QPainter::HighQualityAntialiasing);
  7. m_view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
  8. m_view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
  9. ....
To copy to clipboard, switch view to plain text mode 

While initializing the view I can set view->setBackgroundColor(Qt::blue),etc. And it works fine. But how to update the backgroundcolor later?

Thanks.