[Interest] QAbstractItemModel

Alejandro Exojo aexojo at modpow.es
Tue Feb 11 10:40:36 CET 2014

2014-02-10 16:26 GMT+01:00 Graham Labdon <Graham.Labdon at avalonsciences.com>:
> 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.

When you create a class based on QAbstractItemModel, you are the one
who choses what or where is the actual data. Such data can be anywhere
(files, network, in memory variables, etc.). What you do when subclass
QAbstractItemModel is provide to Qt's view classes a way to access the
data for reading, and a way for writing changes back.

Where is your data coming from?

Alejandro Exojo Piqueras

ModpoW, S.L.
Technova LaSalle | Sant Joan de la Salle 42 | 08022 Barcelona | www.modpow.es

More information about the Interest mailing list