Assuming the table's id starts at 0 like the combobox's index:
Qt Code:
  1. qry.prepare("SELECT * FROM note WHERE id = :id");
  2. qry.bindValue(":id", index);
To copy to clipboard, switch view to plain text mode 

Cheers,
_