title: Qt - zoom in/out with QSlider
body: <p>I want to integrate a zoom slider for a <code>QGraphicsView</code>. I use <code>QGraphicsView::scale()</code> for zoomig.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    void MainWindow::on_sld_zoom_valueChanged(int value)
  {
      ui-&gt;graphicsView-&gt;setTransformationAnchor(QGraphicsView::AnchorViewCenter);
      double scaleFactor;
      scaleFactor = pow(1.1,((value - 100) / 100.0));
      ui-&gt;graphicsView-&gt;scale(scaleFactor,scaleFactor);
  }
  </code></pre>
  
  <p>My min slider value is 1, max is 200 and when value is 100, my scaleFactor is 1 according to my function.But if scaleFactor is bigger than 1, slider always zooming in. For example, when I change value from 150 to 149, it should be zoom out but it doesn't because zoom factor is bigger than 1.</p>
  
  <p>How can I solve this problem? </p>