PDA

View Full Version : QT - MVC - Refreshing column and row data in the model that is passed to View



chaitu927
22nd December 2016, 22:48
Hello All,

I am passing data to the View(Qtitan::GridBandedTableView similar to TableView) using Model(QStandardItemModel). I want to refresh the data(both columns and rows) when I select a different value in the drop down. Can you please help me with this.

I am populating QStandardItemModel using
model->setItem.
I am passing model to view using
grid->view<Qtitan::GridBandedTableView>()->setModel(model);

anda_skoa
23rd December 2016, 11:49
QStandardItem's setData() should already emit the dataChanged() signal, so you should be ok.

Cheers,
_