[Development] Qt6 source changes

Shawn Rutledge Shawn.Rutledge at qt.io
Fri Nov 2 07:05:36 CET 2018



> On 31 Oct 2018, at 13:21, Giuseppe D'Angelo via Development <development at qt-project.org> wrote:
> 
> Hi,
> 
> Il 31/10/18 11:19, Иван Комиссаров ha scritto:
>> 1) QAbstractItemModel. I want to introduce change that adds QModelIndex parameter to  headerData(). For now, QHeaderView ignores the rootIndex() property which prevents creating models with sub tables in each index (only tree models are supported now). The example - you need to display a struct (or, protobuf message) as a table. Each struct can have sub structs (or, arrays of structs) so the tree is not enough to display it. I wrote a working prototype back in 2015 which required subclassing QAIM and copying the whole QHeaderView into the project. In this case source compatibility can be saved by having 2 virtual headerData methods, the one without modelIndex market deprecated.
> 
> This is reasonable given the tree-of-tables that QAbstractItemModel models; there's the bigger question of whether the one-API-fits-all is a good way forward, however I don't see anyone willing to rewrite the model classes for this. (There are also another couple of ideas I have in the QAIM department, e.g. a multiData(), which is just BC because it's a new virtual).

If anyone was willing to work on it, what sort of API would you propose?



More information about the Development mailing list