I have a QGraphicsItem that will copy its children (I have enabled its ItemClipsChildrenToShape flag). I noticed that cropping makes binding of the mouse event to children elements inaccurate: instead of the exact shape of the elements, their bounding rectangles are used to determine which element is in a particular position, so that children receive mouse events in their entire bounding box. When clipping is not enabled, it works fine as expected.
Setting the granularity of the boundary areas of the children to 1.0 did not help. I am using qt 4.5.0.
The program with which I tested this problem is available at http://pastebin.com/m3d0cfb53
I could not find anything of such behavior in qt docs. I would like to know if this is a bug in qt and if there is a workaround for this.
source
share