This question may have been answered somewhere else already, but I just can't seem to find the answer. I'm using the model to display a set of data from a sql database. I'm using the QSqlQueryModel to retrieve the data.

In the QSqlQueryModel I need to add a column that is editable for the user. The data needs to be saved in the model and not committed to the database. This means that the setData function from QSqlQueryModel needs to be implemented and change the internal data. Is this possible? And is there an example?

Any help is appreciated, thanks.