ClipRegion is only used to make sure you don’t paint outside of a boundrary you set. It will not help you speed up your app.
I think you are misunderstanding what setClipRegion does. The same amount of objects are being rendered and the same amount of pixels will be processed. The only difference is that by setting the clipRegion, now every single pixel you try to draw will be compared against the clipRegion before it’s rendered to screen. In other words you just made your application slower.
To speed up your app, you could instead be more intelligent about what to draw. I.e instead of setting the clipRegion, you can check if your rectangle intersects with the view rect before you paint it and skip it if it does or sort your rectangles in some way that makes this easier. The QGraphicsView already has such functionality built in for instance.
↧