frederic.mantegazza at gbiloba.org
Fri Feb 6 09:32:37 GMT 2009
I draw a crosshair cursor on a scene. This crosshair is defined as
def __init__(self, parent=None):
QtGui.QGraphicsItemGroup .__init__(self, parent)
self._yawLine = QtGui.QGraphicsLineItem()
self._yawLine.setLine(0, -100, 0, 100)
self._pitchLine = QtGui.QGraphicsLineItem()
self._pitchLine.setLine(-100, 0, 100, 0)
But I have a CPU usage issue; on Nokia N8x0, this is pretty unusable. I
was wondering if defining a correct region returned by boundingRegion()
could improve performances? The problem is I don't understand what
should I return, here... What is the region for this crosshair?
Thanks for you help.
PS : or if you see a better way to define this crosshair... With this
code, I change its coordinates in the scen by calling:
I would like to keep it as simple.
More information about the PyQt