jonks
14th February 2010, 23:39
Hi,
I'm trying to make my QGraphicsItem only respond to mousePressEvent's if the user clicks on opaque pixels of the item.
How should I go about doing this?
So far I think I have to obtain the raw pixels of the QGraphicsItem, but this seems to be very inefficient.
(I guess I need to render the QGraphicsItem to an off scene buffer, then do a x,y pixel lookup on the buffer).
Any ideas?
Thanks!
I'm trying to make my QGraphicsItem only respond to mousePressEvent's if the user clicks on opaque pixels of the item.
How should I go about doing this?
So far I think I have to obtain the raw pixels of the QGraphicsItem, but this seems to be very inefficient.
(I guess I need to render the QGraphicsItem to an off scene buffer, then do a x,y pixel lookup on the buffer).
Any ideas?
Thanks!