Hello,

I have a problem with the following lines.

Qt Code:
  1. QSqlQuery query(db);
  2. query.prepare("INSERT INTO demo1 (id) VALUES (?)");
  3.  
  4. QUuid uuid = QUuid::createUuid();
  5. query.bindValue(0, uuid.toString());
To copy to clipboard, switch view to plain text mode 

I receive the error
error: no matching function for call to ‘QSqlQuery::bindValue(int, QString)

But I don't know why. Can anyone help me ?

Regards,
Luc