Seven years! A new record? 
If you scale something by a factor of 2, then 3, then 4, then 3 ... as you move the slider up and down you have scaled by 72 or more very quickly.
You want the slider to give you an absolute scale factor and apply that as the total scaling for the view.
The first part is up to you and how your application should function: for example, a slider over the range -100 to +100 might give you a scale factor over the range 0.01-100.0
double scale = pow(10.0, (slider->value() / 50.0));
double scale = pow(10.0, (slider->value() / 50.0));
To copy to clipboard, switch view to plain text mode
The second part is achieved by reseting the view tranformation matrix between scaling calls (if there are no other transforms) or applying the inverse of the existing scale before applying the new scale.
Bookmarks