[PyQt] PyQt5.8.2 Qml GridView TypeError: unable to convert a Python 'MyListModel' object to a C++ 'QAbstractListModel*' instance

chunyisong at sina.com chunyisong at sina.com
Thu Apr 6 04:03:59 BST 2017


>I can reproduce the problem. The failure happend between trigger 107 and trigger 108. At that time the C++ instances of the RuleModel objects are being deleted via calls to deleteLater() - presumably from within the depths of the QML implementation. I don't know why this is happening - it smells like a Qt bug.
>
>However giving the RoleGroupModel instance as the parent of each of the RoleModel instances seems to fix the problem.
>
>Phil
Thank you,Phil.As what you said,it may be a problem of ObjectOwnership but the error made me confused.I will check it out,thanks again
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170406/ab2435ea/attachment-0001.html>


More information about the PyQt mailing list