i want to display a car photo.
after loading, user can move the car by pressing keys on keyboard.
when he press "up arrow", car will move upwards.
which methos should i use to show the photo. Qlabel.setpixmap??
The code below shows the image on a new widget, but i want to show it on my mainwindow page.
What should i do?
Thank you

Qt Code:
  1. void MainWindow::showIt()
  2. {
  3. QLabel *image = new QLabel();
  4. image->setPixmap( QPixmap( "car.jpg" ) );
  5. image->show();
  6. update();
  7. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. MainWindow::MainWindow(QWidget *parent) :
  2. QMainWindow(parent),
  3. ui(new Ui::MainWindow)
  4. {
  5. ui->setupUi(this);
  6. showIt();
  7. }
To copy to clipboard, switch view to plain text mode