Hello,

I've just started using QAbstractItemModel and QModelIndex with the intent of storing data that I will subsquently display in a QTableWidget subclass and also manipulate in other ways etc. I sort of expected that QAbstractItemModel would contain its own (private) container members so that I could just enter in and retrieve cell data with accessor members like setData(...)/data(). (Like wxGrid and wxGridTableBase.) However, given how data(), rowCount(), and columnCount() are pure virtual, and SetData(...) "... must be reimplemented for editable models." (documentation), and finally that QModelIndex::data() just refers back to its QAbstractItemModel, it looks like this is not true. I.e., I have to create my own container member, such as a vector, to store data values, and implement the above-named functions to access/manipulate *that*.

Is this right? If so then I kind of wonder what QAbstractItemModel is for--i.e., why not just create my own little TableDataStorage class with a vector, setData()/data() functions, and use that? Or to put it another way--do you guys in general find QAbstractItemModel to be useful? Thanks--

Matt