[PyQt] exposedRect option passed to paint in subclass of QGraphicsItem
buddy+pyqt at nmt.edu
buddy+pyqt at nmt.edu
Sun Jan 17 18:05:56 GMT 2010
I just updated my windows machine to the latest Qt and PyQt versions and I've been
having a problem with my custom subclasses of QGraphicsItems. When I reimplement
the paint method it gets passed several option as a QStyleOptionGraphicsItem object.
The exposedRect member of that is suppose to contain the area the needs to be
repainted, however I always get a null rectangle. Attached is a simple example I
put together to illustrate the problem. The attached example attached is suppose to
draw a 3x3 rectangle under the mouse cursor when the mouse button is pressed down,
but
since the exposedRect is always null it does nothing. It also prints out the
rectangle and I always get lines of all zeroes when I run it. I think this may be a
bug, but please tell me if I'm just doing something wrong or if something is messed
up with my PyQt install.
Thanks,
Buddy
More information about the PyQt
mailing list