How to zoom in a QgraphicsView using pushbuttons?
<p>I'm building a very simple image editor on Qt creator.I have my image displayed on a QGraphicsView and i want to give the user the ability to zoom in and out by a pushbutton.</p>

<p>I've searched a lot and found how to zoom in and out through the mouse wheel.As i am very new to Qt i can't adjust it to the pushbutton because i don't understand everything clearly.</p>

<p>I' ve tried this(without understanding completely what i'm doing)but the result isn't the wanted.It zooms in only once and quite abruptly.I want a smoother zoom and as many times as i want.</p>

<pre><code>void MainWindow::on_pushButton_clicked(){
    QMatrix matrix;
    ui-&gt;graphicsView-&gt;setTransformationAnchor(QGraphicsView::AnchorViewCenter);
    matrix.scale(1.0,1.0);
    ui-&gt;graphicsView-&gt;setMatrix(matrix);
    ui-&gt;graphicsView-&gt;scale(1,-1);
}
</code></pre>

<p>I would be very grateful if you guys can help</p>