I can drag the rectangle and find out the coordinates of the rectangle
But there are two questions I don't know how to solve

1 : How could I adjust the size of rectDrag by pulling the corners of the rectDrag?
2 : After I select the region, I need to translate the coordinates(region) to the coordinates
of the original image, how could I translate the coordinates after scaling by the
fillMode--Image.PreserveAspectFit?

edit: found Qt offer a rubberband class in c++, maybe I could use it to implement the
rubberband?