Hi All,

I am making an application which draws lines and points on the screen where the user can select and drag the "points", much like the Qt "pathstroke" example.

Currently, I am trying to add the ability to zoom in and out which is quite simple from a visual perspective - I just add scaleFactor variable (set to 1.0 initially) then call QPainter::scale(m_scaleFactor, m_scaleFactor) in my paint event. No problems.

The problems comes when I zoom in then try to select a "point". Obviously, I need to convert the mouse position into the correct units, but no matter what I try to do, it doesn't work.

I assumed it was just a case of applying the scaleFactor to the mouse position but maybe I am being WAY TO naive here. Can anyone point me in the right direction? Can this be acheived simply or should I go away and read a book on vector graphics?