The docs contain an exampe editable QSqlQueryModel that might serve as a starting point.

Another approach might be to use a model that lazy loads the entry details only when first requested. Drop would insert only the id, and data() would fetch the details of the entry (possibly cache them) when a view/consumer asked for the values.