I have a set of points defines in world coordinates. I draw these points on to a pixmap and I have made use of a QTransform to map points from say... a scene rectangle of QRectF(1000,2000,4000,3000) to a pixmap of size (1000,1000). O.k. now I want to scale the points such that if the scene changes to QRectF(1000,2000,4000,1500) Instead of my points getting squeezed by half the height, I want the points to be scaled but also translated such that the 2 rectangles end up with the same center. In this way, if the height is half then the center point will be the same but the topLeft() and bottomRight() points will be adjusted.

I have definitely looked at the code on QTransform and mapping. Matrices are not my strong point. Maybe I am missing a simple step.

any help would be appreciated,

spawn9997