Hi,

I am working on a application in which I have more than 500 widgets on screen. I have to add Zoom facility to view the widgets properly.
Following widgets are on UI
QDial- I have sub-classed it to override paintEvent, to paint background image. I have separate image for each QDial value
QLabel- sub-classed it, just for future use
QButton- sub-classed it, for future use
QSlider - subclasses, for future use
QPushButton - subclasses, catch mouse press and release event to color text differently.

So all the widgets that get displayed are subclass of Qt widgets.

I also have following settings for my graphics view and scene.

Qt Code:
  1. scene.setItemIndexMethod(QGraphicsScene::NoIndex);
  2. view.setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
  3. view.setOptimizationFlag(QGraphicsView::DontSavePainterState);
  4. view.setViewportUpdateMode(QGraphicsView::MinimalViewportUpdate);
  5. view.setWindowTitle("Peavey Surface");
  6. view.setDragMode(QGraphicsView::ScrollHandDrag);
  7.  
  8. view.showMaximized();
To copy to clipboard, switch view to plain text mode 

Now when I zoom out, so that I can view all the widgets, the application response becomes slow. Meaning when I press and release button, I see the response after fraction of section. Its not like 2 seconds later, but definitely noticeable.

Initially I thought that its because of painting background image for the QDials, but the issue remains even after don't draw the background images.

How can I improve the performance?