You still didn't catch what i mean. I mean that ,only when i remove the mouseMoveEvent(QMouseEvent *event) function in the class which inherit from QGraphicsView , then the rubberbandrect can be achieved.(The rubberband rect function was achieved through the way :reimplement mousePressEvent, mouseMoveEvent , mouseReleaseEvent function in the class which inherit from QGraphicsItem).
If i don't remove the mousemoveEvent function in the class which inherit from QGraphicsView, then the rubberbandrect can't be achieved. Now i think the main reason is that the class which inherit from QGraphicsView has intercepted the mouse event before the class which inherit from the item.
Bookmarks