Quote Originally Posted by olidem View Post
Please note the following:
A MouseEvent propagates at first to the item under the mouse.

If you subclass the item and call QGraphicsItem::mouseXXXEvent(envent), it will be propagated further. If you don't do that, the event is seen as processed and "dies".
But if you call the parent handler, then you will meet this event also in the scene and the view again.

Regards,
Olli
Oh, thank you very much!
I think this will help me! because i didn't call QGraphicsItem::mouseXXXEvent(envent), so maybe the event is seen as processed and "dies",but i tried this ,but the rubberband rect hadn't been drawn and nothing do to the graph, except the mouse postion tracking .

i will try again!
And now i have remove all mousePressEvent,mouseMoveEvent,mouseReleaseEvent in the class which inherit from the QGraphicsItem.
Then i write the code of zoom in through select a rubberband rect in the class which inherit from the QGraphicsView.At last ,the mouse postion tracking didn't colides with the selection of rubberband rect. and this resolve my problem.
As aamer4yu's reply of #6, he said that
"I dont think you have to go to items level for that. What you need to do is - catch mouse events in your scene / view. Draw the rubberband in mouse move events, and finally on mouse release event you capture a rect, from the mousepress(x,y) and mouserelease(x,y).
Now you convert this rect in to scene rect, and call QGraphicsView::fitInView()
Thats it, you are zoomed in :-) , and you only had to capture events in the view "

He was right, i needn't have to go to the items level. both mouse position tracking and rubberband rect zoom can both be handed in the QGraphicsView level.

but i still puzzled why the view class intercepted the mouse event before the item ?