Thanks Wysota,

I agree, it is a strange design - one that I inherited.

However, I timed this whole paint() routine as I was worried about the conversions and they are not significant compared to the delay I experience. This whole routine only takes a few ms.

I do cache the images - but only load them as and when needed. . The routine normally returns from the first return statement. However the paintEvent in QGraphicsView takes a long time - even when the pixmaps are cached?? The paint routines for the items within the view are very quick.

This section takes around 1ms on either platform, so I dont think the delay is here:

Qt Code:
  1. if (m_graphicsItem->type() == QGraphicsPixmapItem::Type)
  2. {
  3. // We've already loaded the image to display.
  4. QGraphicsItemGroup::paint(painter, option, widget);
  5.  
  6. // Is there anything to clean up? See below.
  7. if (m_graphicsItemToDelete) {
  8. delete m_graphicsItemToDelete;
  9. m_graphicsItemToDelete = 0;
  10. }
  11.  
  12. return;
  13. }
To copy to clipboard, switch view to plain text mode 

The actual painting on the screen seems to be slow, as opposed to the conversions/calculations etc.