Anyone here has experience with QGraphicsPixmapItem? See, I am trying to load an image from a dialog. After selecting an image, the image must be loaded to a QGraphicsView. I do not know how to do this. here's my load function

void MainWindow:pen()
{
QString fileName = QFileDialog::getOpenFileName(this,
tr("Open File"), QDir::currentPath());
if (!fileName.isEmpty()) {
QImage image(fileName);
if (image.isNull()) {
QMessageBox::information(this, tr("Image Viewer"),
tr("Cannot load %1.").arg(fileName));
return;
}

QGraphicsScene scene;
scene.setSceneRect( -100.0, -100.0, 200.0, 200.0 );
QGraphicsPixmapItem *item = new QGraphicsPixmapItem(QPixmap::fromImage(image), 0, &scene);
item->setShapeMode(QGraphicsPixmapItem::BoundingRectSha pe);

//graphicsViewRaw is globally declared as QGraphicsView
graphicsViewRaw->setScene(&scene);
graphicsViewRaw->show();
}
}

how do I paint the image to the QGraphicsView? after graphicsViewRaw->show() no image is loaded.