On 02/10/2014 10:26 AM, Graham Labdon wrote: > Hi > I have just started with QAbstractItemModel and have some doubts as to > whether I am doing things in the correct way. > > I have class that (amongst other things) is storing a set of data that I want > to display in a QTreeView. > So I made a model class derived from QAbstractItemModel and have then > attached this model to my QTreeView which does show the data correctly and > allows the user to edit the values. > As expected when an edit is completed my setData method gets called and I can > set the relevant items data. > However, this does not update the underlying data and I am struggling to see > how this is done. >
What is the difference between "the relevant items data" and "the underlying data". Model::setData is where you set the relevant items underlying data. Bill > I would be grateful if someone could > a) confirm that I am doing things correctly > b) explain how the underlying data is typically updated > > Thanks > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > > _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest