Hello,

I am trying to write a roundabout simulator. I have a class inheriting QGraphicsView. Here's the initialization from the constructor:
Qt Code:
  1. _scene = new QGraphicsScene;
  2. _scene->setSceneRect(-1000, -1000, 2000, 2000);
  3. _scene->setItemIndexMethod(QGraphicsScene::NoIndex);
  4.  
  5. setScene(_scene);
  6. setCacheMode(QGraphicsView::CacheBackground);
  7. setViewportUpdateMode(QGraphicsView::SmartViewportUpdate);
  8. setDragMode(QGraphicsView::ScrollHandDrag);
  9. setOptimizationFlag(DontAdjustForAntialiasing);
To copy to clipboard, switch view to plain text mode 
I tried adding some mice from Colliding Mice example. When there are more then twenty (or so) of them, performance drops. I commented out any of my roundabout-drawing code, so now it's just mice on a green background.
I tried simplifying the mouse:aint() and mouse::advance() functions, but that didn't seem to do the trick.

What is the reason behind the slowdown? I wanted to have many more cars moving (and detecting collisions) then twenty should I use different approach then GraphicsView?