[PyQt] exposedRect option passed to paint in subclass of QGraphicsItem

buddy+pyqt at nmt.edu buddy+pyqt at nmt.edu
Sun Jan 17 18:14:29 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 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.  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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.py
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100117/011dfa18/attachment.ksh>


More information about the PyQt mailing list