title: How to display an image in QGraphicsView
body: <p>I've created a Graphics View object in my mainwindow.ui file and I'm trying to display an image in that. For TextBrowser objects, I was doing like this   </p>
  
  <pre><code>QTextBrowser *textBrowser_Actors = this-&gt;findChild&lt;QTextBrowser*&gt;("textBrowser_Actors");
  textBrowser_Actors-&gt;setText(QString::fromUtf8(movie.get_actors().c_str()));
  </code></pre>
  
  <p>Similar way, how do I set an image after finding a GraphicsView by the below method?</p>
  
  <pre><code>QGraphicsView* movie_poster = this-&gt;findChild&lt;QGraphicsView*&gt;("movie_poster");
  </code></pre>
  
  <p>I tried the following from googling a bit, but couldn't get it working so far.</p>
  
  <pre><code>QGraphicsScene* scene = new QGraphicsScene();
  movie_poster-&gt;setScene(scene);
  QGraphicsPixmapItem* item = new QGraphicsPixmapItem(QPixmap::fromImage("movie.jpg"));
  scene-&gt;addItem(item);
  movie_poster-&gt;show();
  </code></pre>
  
  <p>Edit-1</p>
  
  <pre><code>int main(int argc, char *argv[])
  {
      std::vector&lt;Movie&gt; movie_vector; // This is where movie DB will be read to, and new movies will be added to
      MainWindow w;
      w.setWindow(movie_vector[0]); // calling setWindow with first movie
      w.show();
      return a.exec();
  }
  
  //setWindow definition    
  void MainWindow::setWindow(Movie &amp;movie) {
  
  // Next two lines gets the textBrowser object and set its value to movie title
      QTextBrowser *textBrowser_Title = this-&gt;findChild&lt;QTextBrowser*&gt;("textBrowser_Title");
      textBrowser_Title-&gt;setText(QString::fromUtf8(movie.get_title().c_str()));
  
  // This is where I'm trying to get GraphicsView object and set an image in it.
      QGraphicsView* movie_poster = this-&gt;findChild&lt;QGraphicsView*&gt;("movie_poster");
      QGraphicsScene* scene = new QGraphicsScene();
      movie_poster-&gt;setScene(scene);
      QGraphicsPixmapItem* item = new QGraphicsPixmapItem(QPixmap("C:\Users\Name\Desktop\codes\Qt\MovieDB\titanic.jpg"));
      scene-&gt;addItem(item);
      movie_poster-&gt;show();
  }
  </code></pre>