Hi,
I load several thousand QGraphicsItems into a QGraphicsView and am having a serious problem with the update system. Once loaded, my cpu will churn away between 60-100%. I've figured out that this is mostly from bounding rect calls, and am not sure how to get rid of them.
Is this a common problem? I haven't seen any other threads about a rampaging CPU when the program is idle, and am not certain where to look in my code for this.
FYI I have indexing turned off if this is maybe related.
On a very closely related note, If I turn off viewport updates:
self.setViewportUpdateMode(QtGui.QGraphicsView.NoV iewportUpdate)
this gets rid of the churning, and I use QGI.repaint() to render my hover highlighting, but there are two new problems (so far).
1 my hover highlight is rendered as semi-transparent, other painter stuff is rendered semi-transparent as well.
Any advice on this? I have no clue as to why the transparency changes with the internal update system off.
2 I lose scrolling. I can repair the scrolling by overriding scrollContentsBy and including a viewport().update() call, but my scrolling becomes way jumpy compared to when viewport updates are turned on.
Any advice on how the update system makes QGV scrolling so smooth?
Thanks,
Deacon
Bookmarks