[Interest] Performance of QGraphics[View Scene] changes with zoom

Lisandro Damián Nicanor Pérez Meyer perezmeyer at gmail.com
Wed May 18 20:57:04 CEST 2016


Before I try to code a stripped-down version of my issue I would like to 
describe it in case I'm missing something obvious.

I have an app with a QGraphicsScene that holds a vehicle which is constantly 
moving at a fixed rate (~10 times per second). Every time it moves it draws 
some polygons behind (the path it went trough). Up to that point, everything 
is ok.

Now if I add a lot of straight lines (QGraphicsLineItem instances) performance 
(number of movements seen on screen per second) varies according the zoom. If 
I zoom in I get to a point in which everything is too slow. If I zoom out 
things go back to normal. Note that once the lines are generated they are not 
changed in any way.

I understand that performance might decrease if those lines are near 45º due 
to bounding boxes, but I fail to understand why it varies with zoom.

I'm using Qt 5.5 on Linux.

Thanks in advance, Lisandro.

-- 
Lisandro Damián Nicanor Pérez Meyer
http://perezmeyer.com.ar/
http://perezmeyer.blogspot.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160518/9b9f37e8/attachment.sig>


More information about the Interest mailing list