I have simple master detail application using QDataWidgetMapper in master table; I added a blob in database and QLable to show the picture and button to select a picture

The button code

Qt Code:
  1. QString pix = QFileDialog::getOpenFileName(
  2. this, tr("Open file"), "/MyDocument/", tr("PNG Images (*.jpg)") );
  3.  
  4. QImage image(pix);
  5. ui->pix_label->setPixmap(QPixmap::fromImage(image));
To copy to clipboard, switch view to plain text mode 

and the classic mapper code

Qt Code:
  1. mapper = new QDataWidgetMapper(this);
  2. mapper->setModel(model);
  3. mapper->setItemDelegate(new QSqlRelationalDelegate(this));
  4. mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
  5. mapper->addMapping(ui->id,model->fieldIndex("id"));
  6. mapper->addMapping(ui->fName,model->fieldIndex("fName"));
  7. mapper->addMapping(ui->lName,model->fieldIndex("lName"));
To copy to clipboard, switch view to plain text mode 

Now, I tried to add this line but couldn't navigate pictures

Qt Code:
  1. mapper->addMapping(ui->picture_label,model->fieldIndex("picture"));
To copy to clipboard, switch view to plain text mode 


I need help to make that works, I'm a just beginner, so a detailed code is appreciated. Thanks in advance