title: Qt5 C++ QGraphicsView: Images don't fit view frame
body: <p>I'm working on program which shows user some picture that is selected by him. But there is a problem because I would like to fit this picture in QGraphicsView's frame and the picture is really smaller than the frame.</p>
  
  <p>So here's my code:</p>
  
  <pre><code>image = new QImage(data.absoluteFilePath()); // variable data is defined when calling this method
  scn = new QGraphicsScene(this); // object defined in header
  ui-&gt;graphicsView-&gt;setScene(scn);
  scn-&gt;addPixmap(QPixmap::fromImage(*image));
  ui-&gt;graphicsView-&gt;fitInView(scn-&gt;itemsBoundingRect(),Qt::KeepAspectRatio);
  </code></pre>
  
  <p>I was trying a lot of solutions that I found on web, but no one didn't help me. The picture is in size around 40 x 60 px when the frame is 200 x 400 px. What could be wrong?</p>
  
  <p>Here is some example of what is produced with code above and what I want to get out:
  <img src="https://i.stack.imgur.com/CCTUT.png" alt="enter image description here"></p>