QGraphicsScene *scene = new QGraphicsScene; scene->addPixmap(QPixmap(qApp->applicationDirPath()+"/cat.jpg")); ui->graphicsView->setScene(scene); ui->graphicsView->show();