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
void MainWindow::showIt()
{
QLabel *image = new QLabel();
image->setPixmap( QPixmap( "car.jpg" ) );
image->show();
update();
}
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
showIt();
}