Hi,

I am using a QTreeView with an QAbstractItemModel to display my data.
My data changes sometimes and I need to inform the QTreeView about the changed data, how do I do this?

For example, when I first call setModel() on the QTreeView there is no data.
After this I add ~20 items to the data list.. but the QTreeView doesn't refresh...

I tried to emit "dataChanged" and "layoutChanged", but it didn't work.. my current workarround is:

Qt Code:
  1. treeView->setModel(NULL);
  2. treeView->setModel(&model);
To copy to clipboard, switch view to plain text mode 

what's the correct way to do this?

Kira