[Development] qsizetype and classes working with QStrings or QList

Mathias Hasselmann mathias at taschenorakel.de
Tue Aug 25 08:22:35 CEST 2020

Am 25.08.2020 um 01:09 schrieb Thiago Macieira:
> On Monday, 24 August 2020 15:10:24 PDT Иван Комиссаров wrote:
>> It would be nice if QAbstractItemModel will support qsizetype instead of
>> int, but I do not see how this is possible considering the fact that
>> rowCount/columnCount return int. I suppose, it is not very hard to patch
>> QModelIndex, but what to do with virtual functions? The user code will
>> break. The only solution I see is to add QAbstractItemModelV2 with the
>> «wide» interface and provide a proxy for the old one.
> Do we need models with more than 2 billion rows or columns?
Not really, but I'd really enjoy implementing list models without having 
to litter static casts all over the place. Well, but seems that chance 
got missed once again with qsizetype still being signed. So what.


More information about the Development mailing list