Hello good request a little help is that I'm trying to create a database application with the driver qmysql in which I need to save data with all employees and photo (in the same database) for reasons that everything is going to centralize on a remote server and I've searched on google and come in php examples but someone has knowledge about the topic who can give me a help?.

What they do is the following routines:
************************************************** ***********************************
1 .- capture the image with a digital camera and copied the hard drive.
2 .- Through a QFileDialog locate the picture, save your route and name in a call QString archivo_foto
3 .- a QLabel I put in the value setPixmap the path and filename of the image and choose the shows QFileDialog
the picture on the label.

Qt Code:
  1. int MainWindow::captura()
  2. {
  3. QString archivo_foto;
  4. archivo_foto = QFileDialog::getOpenFileName(this,tr("Abrir Archivo"),tr("/home/Imágenes"),tr("Imagenes(*.png *.xpm *.jpg"));
  5. ui->label_foto->setPixmap(archivo_foto);
  6. return 0;
  7. }
To copy to clipboard, switch view to plain text mode 

But the problem comes when I save the query where I add the second field of this VALUES
ui-> label_foto-> pixmap () does not know if I miss something or have to convert that into the database field I put as LONGBLOB

Qt Code:
  1. QSqlQuery query;
  2.  
  3. query.exec("INSERT INTO `ismed`.`empleados` (`id` ,`foto`,`nombre` ,`apellidop` ,`apellidom` ,`puesto` ,`direccion` ,`fecha_ingreso` ,`salario` ,`depto` ,`activo`)VALUES (NULL ,"+ ui->label_foto->pixmap() +",'"+ui->lineEdit_2->text()+"', '"+ui->lineEdit_3->text()+"', '"+ui->lineEdit_4->text()+"', '"+ui->lineEdit_5->text()+"', '"+ui->lineEdit_6->text()+"', '"+ui->lineEdit_7->text()+"', '"+ui->lineEdit_8->text()+"', '"+ui->lineEdit_9->text()+"', '"+ui->lineEdit_10->text()+"');");
To copy to clipboard, switch view to plain text mode 

I mark the following error:

/home/horus/sql/mainwindow.cpp:56: error: invalid operands of types ‘const char [167]’ and ‘const QPixmap*’ to binary ‘operator+’

thank you very much for your help