[Interest] QAbstractItemModel
Graham Labdon
Graham.Labdon at avalonsciences.com
Mon Feb 10 16:26:38 CET 2014
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.
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
More information about the Interest
mailing list