I have a QSqlQueryModel tied to a QTableView with "select lastname, firstname, ID from Account", displaying non-unique lastname and firstname columns. I want to store a special ID field/metadata to each record (similar to widget item's data roles?), so that when the user double clicks on an entry, I can just extract the ID and process it using the special ID, without making an extra query to the database. But I don't want to display the ID column. How should I do this? Maybe there are multiple ways to do this?
Thanks,
Bookmarks