прототип:
void author_insert(const QSqlDatabase& dataBase, QString surname, QString firstname, QString description, const QPixmap& foto = QPixmap(":images/noauthor"));
реализация:
void author::author_insert(const QSqlDatabase &dataBase, QString surname, QString firstname, QString description,const QPixmap& foto){
if(dataBase.isOpen()){
QSqlQuery sql = QSqlQuery(dataBase);
sql.exec(tr("SET NAMES 'UTF-8'"));
sql.exec(tr("INSERT INTO author (surname,firstanme,description,foto) values(%1,%2,%3,%4)").arg(surname).arg(firstname).arg(description).arg(foto));
}
}
Ошибка:
error: no matching function for call to 'QString::arg(const QPixmap&)'