The zoom values are not meant to be absolute, but relative to the previous value.
void MainWindow::zoomSlider(int newLevel) { static const qreal zoomMatrix[5][5] = { // Matrix initialized to zoom in and out by a factor of 1.5. // To use a different factor, change the numbers. // You can even use a variable factor, to allow e.g. // logarithmic or exponential zoom. { 0.0000, 1.5000, 2.2500, 3.3750, 5.0625 }, { 0.6667, 0.0000, 1.5000, 2.2500, 3.3750 }, { 0.4444, 0.6667, 0.0000, 1.5000, 2.2500 }, { 0.2963, 0.4444, 0.6667, 0.0000, 1.5000 }, { 0.1975, 0.2963, 0.4444, 0.6667, 0.0000 } }; qreal zoom = zoomMatrix[oldLevel][newLevel]; getCurrentImageArea()->zoomImage(zoom); getCurrentImageArea()->setZoomFactor(zoom); oldLevel = newLevel; }