title: Qt QGraphicsScene does not fitInView() with scrollbars
body: <p><a href="http://qt-project.org/doc/qt-4.8/qgraphicsview.html#fitInView" rel="nofollow">QGraphicsView::fitInView()</a> seems to ignore the presence of scrollbars, that apparently are overlaid. (It also uses a hardcoded 2 pixel margin.)</p>
  
  <p>There is a related bug report (<a href="https://bugreports.qt-project.org/browse/QTBUG-1047" rel="nofollow">https://bugreports.qt-project.org/browse/QTBUG-1047</a>) stating that calling fitInView() twice would resolve the problem.</p>
  
  <p>In my case, it does not. Only triggering it twice manually fits regarding the scrollbars. This does not work:</p>
  
  <pre><code>void myGraphicsView::mousePressEvent(QMouseEvent *event) {
    if( event-&gt;button() == Qt::LeftButton ) {
      QGraphicsItem* clicked = scene()-&gt;itemAt( mapToScene( event-&gt;pos() ) );
      qDebug() &lt;&lt; clicked &lt;&lt; clicked-&gt;boundingRect();
      fitInView( clicked, Qt::KeepAspectRatio);
      fitInView( clicked, Qt::KeepAspectRatio); // doesn't work for me
      QGraphicsView::mousePressEvent(event);
      return;
    }
  }
  </code></pre>
  
  <p>Is there another workaround?</p>
  
  <p>Qt 4.8.1 with MSVC2010</p>