[Qt-interest] QAIM::headerData() is not tied to QModelIndex?
Kishore
kitts.mailinglists at gmail.com
Sun Aug 15 14:31:20 CEST 2010
Why does the headerData() take section parameter and not a QModelIndex?
I know this is not how QAbstractItemModel is commonly used but QAIM is designed in such a way that every modelindex can again have children and so on... ie. there can be
a table within a table. So essentially, in a tree like structure, a child can have more columns than a parent and with a really different set of headerData as well. A more
relevant API would be something like:
QAIM::headerData ( const QModelIndex &index, Qt::Orientation orientation, int role = Qt::DisplayRole ) const
just the way it is currently with columnCount().
This seems relevant to me currently because I am using an AggregatingModel that aggregates multiple models. The problem is that with such a model it is irrelevant to have
a headerData() unless it was in someway tied to the index (and in turn the actual model that it refers to).
--
Cheers!
Kishore
More information about the Qt-interest-old
mailing list