André spaketh: > I think it is a mistake in the current QAIM design, that all cells have a > separate QModelIndex, and that all cells can have multiple rows and columns > of children, and that the number of columns does not need to match between > them. It is extremely flexible, but it complicates the structure needlessly. > The Qt model/view structure needs, in my opinion, not cater to the very > exotic situation where people want very complex views with multiple levels > of headers and the likes. Let that be the domain of 3rd party components; > they are available if you need them. Let us not reinforce that design > mistake by making headerData more complex than it needs to be. > > I vote against. >
IMHO, this goes to the crux of the issue: Use cases like "file system models" include different types in the model (files, directories), and different views are sometimes interesting (e.g., the current Windows explorer lets you show different header views in different directories, such as "thumbnails" or "details", etc.) I think we'd agree that the QAIM design is complex. I don't criticize that -- it's a Hard Problem. However, I think the issue is that QAIM *itself* has not yet decided how it wants to support models of different *object types* within it. Only the QModelIndex *assumes* the *same type* for all items in the model. Every thing else is agnostic to what types-nest-in-types for a model. That design makes QAbstractItemModel (much) more complicated. A possible point-of-debate is the header data (for whether it should be constant across all items in the model, which is this thread). IMHO, if the goal is for people to merely create new models when they have different item-type-demands (such as need for different header data for different nodes), then the QAIM design could be *massively* simplified to make that type of information constant, making the interface much more trivial, and making it *far* easier to integrate into projects. I understand in the Qt5 timeframe probably nothing can/will be done. However, I vote QAIM decide whether it supports models with heterogeneous types, or not, and *picks* one. I'm a general supporter of its use and design, but IMHO it currently doesn't do either job very well (too complicated for single-type-models, too restrictive for multi-type models). --charley
_______________________________________________ Qt5-feedback mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
