[PyQt] qgraphicsitem not cleared before paint(...) ?

Mads madsornomads at gmail.com
Sun Jan 3 11:13:43 GMT 2010


Hi,

I'm trying to implement a selection marker so the user can see the
selected area in a QGraphicsView. The selection is drawed from a
mousePressEvent(..) until a mouseReleaseEvent(..). However the
QGraphicsItem isn't always cleared before the next selection? Is there
a flush() or something else I need to call?

I have attached the code. The following link points to an image
showing the selections not being cleared:
http://img263.imageshack.us/img263/6339/marker.png.

Thanks!

Best regards,
Mads
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MarkerWidget.py
Type: text/x-python
Size: 1784 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100103/6037cced/MarkerWidget-0001.py


More information about the PyQt mailing list