[Solved]Custom TableModel and redraw View data
I have some raw data, and CustomTableModel which build table from it. Data frequently updated from remote source. Model knows it, and should send some signal to a view for redraw all data. I expect from my model, QSqlTableModel like behavior. Emitting dataChanged() signal has no effect, calling beginInser() and endInsert methods too. Only setModel for a view works for now. I look at QSqlTableModel code but cant figure out how model send update signal to view. Can you tell me please what is right solution of this issue.
Let me close my own question.
When you add new rows to the model use:
//Adding new rows
when you remove rows:
in your case when you reload all data you can use:
Emitting dataChanged() useful if you change value of already existing item