I need to 'goto' a record within the model which is identified with a field value. The field is an auto-incremented index. I can do this by filtering, but that means navigating by next,prev,first,last does not work as I am now working with a result of 1.
I need to maintain access to all records in the table but be able to set the cursor position within the table model according the field value.
The auto incremented field will not necessarily correspond to the model row number as the model may be re-ordered or filtered by the user.
Is it possible to? :
- Filter the model data
- Create a variable pointer to the single filtered record
- Reset the filter
- Set the model index to the previously filtered record
Not really sure if I'm explaining any of this properly!
I'm not even sure if this is possible using the Qt model/view properly. I might try re-implementing the edit form with sql and populating my widgets from the result set.
Bookmarks