Ah!

The documentation of QSqlQueryModel says: "The model is read-only by default. To make it read-write, you must subclass it and reimplement setData() and flags()."

Cheers,
_