Missing QAbstractItemModel.multiData binding

Phil Thompson phil at riverbankcomputing.com
Sun Aug 27 16:45:50 BST 2023


On 14/08/2023 16:21, Jakub Fránek wrote:
> Hello
> 
> I am working on a PyQt app that features a large QTableView driven by a
> custom QAbstractTableModel implementation. Profiling shows that even 
> after
> heavy optimization, the program spends a lot of time calling
> QAbstractItemModel.data method.
> 
> I think that QAbstractItemModel.multiData method could improve the
> performance considerably, however it seems that PyQt does not support 
> this
> binding (since it does not even support QModelRoleDataSpan).
> 
> My question is: is there any plan of supporting
> QAbstractItemModel.multiData method in the future? If there is no such 
> plan
> yet, I would like to cast my vote and humbly request this binding in 
> some
> future version of PyQt.

multiData() and QModelRoleSpan are implemented in the next snapshot - 
please test.

Phil


More information about the PyQt mailing list