title: Qt: show image on widget
body: <p>i want to display a car photo.<br>
  after loading, user can move the car by pressing keys on keyboard.<br>
  when he press "up arrow", car will move upwards.<br>
  which methos should i use to show the photo. Qlabel.setpixmap??<br>
  The code below shows the image on a new widget, but i want to show it on my mainwindow page.<br>
  What should i do?<br>
  Thank you  </p>
  
  <pre><code>void MainWindow::showIt()
  {
      QLabel *image = new QLabel();
      image-&gt;setPixmap( QPixmap( "car.jpg" ) );
      image-&gt;show();
      update();
  }
  
  MainWindow::MainWindow(QWidget *parent) :
          QMainWindow(parent),
          ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
     showIt();
  }
  </code></pre>