[Interest] Problem with QAbstractProxyModel in PyQt 5.9.1

Jérôme Laheurte jerome at jeromelaheurte.net
Mon Dec 18 10:05:25 CET 2017


> Le 18 déc. 2017 à 00:46, Tony Rietwyk <tony at rightsoft.com.au> a écrit :
> 
> Hi Jérôme, 
> I assume that parent.isValid is checking the parent QModelIndex by calling parent.model().columnCount within the DummyModel.  There used to be a Qt utility to check that your models have the correct overrides.  Note that the source model cannot rely on the proxy model for anything - it must be self contained.  
Okay so I guess that returning any non-zero value from columnCount in the source model will do the trick. Thanks.

Best regards
Jérôme Laheurte

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20171218/a05bda16/attachment.html>


More information about the Interest mailing list