In short what I understand is you want to zoom into the scene / view with rubberband effect.
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![]()
Bookmarks