As a last optimization, you can take advantage of OpenGL. Instead of using the default viewport based on QWidget, advise Graphics View to use an OpenGL widget:
QGraphicsView view; view.setViewport(new QOpenGLWidget());
This usually improves the rendering performance. However, Graphics View wasn't designed for GPUs and can't use them effectively. There are ways to improve the situation, but that goes beyond the topic and scope of this chapter. You can find more information about OpenGL and Graphics View in the Boxes Qt example as well as in Rødal's article "Accelerate your Widgets with OpenGL", which can be found online at https://doc.qt.io/archives/qq/qq26-openglcanvas.html.
If you want to use a framework designed ...