Remove row from QSqlTableModel
Unsolved
General and Desktop
-
Hi, I have created a QSqlTableModel with edit strategy is onManualSubmit. Now i want to delete a row from the table. deleted row is not completely removed until i submit the changes. Is there is a any way to remove row instantly from the model but not from the database?
-
Hi,
Something's not clear, why do you want to remove the row only from the model and not from the database ?
-
-
Since you know the row you want to delete you could use setRowHidden for that.
-
Sorry for the late reply. Hidden row is not working because i want to remove row when user click over that row. I did is using TableView's on_table_clicked slot. if i hidden row from model tableView's index and model's index are not going to match. Is there any other solution?