Home > Mobile >  After QGraphicsView zoom display area in the original area of relative coordinates, how to calculate
After QGraphicsView zoom display area in the original area of relative coordinates, how to calculate

Time:09-17

Problems at work, consider the user use convenience, the function of the reference image viewer, in the main display area using QGraphicsView display images, use the left mouse button can drag and drop images, use the mouse wheel to zoom, show the whole picture in the preview area, with a red box labeled the main display area shown in the area, as shown in the figure below,
The question now is, the preview area red box display area has not been associated with the principal part of display area, if I can know display area in the original area of relative coordinate values, it is very convenient, is a great god who have what good method?



Attached source link: https://gitee.com/HelloWorldApple/QGraphicsView-example.git
  •  Tags:  
  • Qt
  • Related