PDA

View Full Version : How can i update QStandardItemModel when data changed in different place in the appl



umen
7th July 2011, 07:39
Hello
im using QStandardItemModel to load data from data structure that is singleton in my application and treeview to display . this data structure is updated each N seconds , how can i update the model every time this singleton got updated ?

ChrisW67
7th July 2011, 08:22
Call QStandardItemModel::setData() with the new data?

meazza
7th July 2011, 09:16
Or you could use the void QAbstractItemModel::beginResetModel () and the void QAbstractItemModel::endResetModel () for the model to query for the data again.