[PyQt] QGraphicsScene/Item/View optimisation

Jan Ekholm jan.ekholm at smultron.net
Fri Feb 6 13:24:57 GMT 2009

On Friday 06 February 2009, Frédéric wrote:
> Le 5/2/2009, "Grissiom" <chaos.proton at gmail.com> a écrit:
> > I think you may try some CacheFlag or OptimizationFlag in QGraphicsView,
> > see:
> >
> >http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsview.h
> >tml#CacheModeFlag-enum
> > http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsview.
> >html#OptimizationFlag-enum
> I tried these flags, but they didnt change anything :o(
> I attached a short example to show my problem. As soon as the crosshair
> starts to move, the CPU goes to 100%!
> Any idea to improve that code?

At least don't use a thread to update GUI stuff, you'll just cause yourself a 
lot of problems and crashes.

Jan Ekholm
jan.ekholm at smultron.net

More information about the PyQt mailing list