Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
As of now there are no clear method to understand status of database record:
- is it fetched from database table or newly added by a user action;
- was it deleted by the user or not.
While Qt for sure internally tracks this status - it is clearly visible with magic markers "!" (deleted) and "*" (created) in vertical header of QTableView - there are no easy universal way to check this status in code.
I propose only one possible solution.
Another one was proposed in QTBUG-492 - to have a new Qt Role that would indicate status of given index - UNCHANGED, NEW, DELETED, MODIFIED.
This thing was discussed for more then 10 years already but still not implemented while it should be a complex task as Qt already operates this data internally and the only thing to do is to give a read-only access to this data.