You know the top left coordinate (in pixels) of the zoom rect, and you can compute the width and height scale factors compared to the full view (x-scale = fullwidth / zoomwidth, y-scale = fullheight / zoomheight). Use QPainter::translate() to move the zoom rect, followed by QPainter::scale() to magnify the contents to fit the whole view.
Bookmarks