[PyQt] PyQt5.6 with Python 3.5 Crash

Rathinam Signup tfa.signup.test at gmail.com
Sat May 20 16:23:29 BST 2017


Hi all,

I did test the same code by porting it back to *PyQt4* and it works without
any issues. So I can assure you that *the bug is with PyQt 5.6*. Can you
please suggest some ways to view the crash report like in which thread the
crash occured?

I set the primary key as User Data in the QAbstractItemModel. When the user
expands the item I pass this primary key to a QThread which connects with
the server and when the results are obtained, I add children for the
corresponding tree item. When the execution hits the line beginInsertRows
the app crashes. Please help me to fix this issue. Thanks.


> Hi Florian,
>
> Thanks again for the response.
>
> >Wouldn't it be easier to just use a QStandardItemModel with
> >QStandardItems
>
> Maybe. But I developed this code based on the simpletreemodel provided with
> PyQt Examples>Item Views. So continued with it.
>
> >Does your model call begin* and end* appropriately?
>
> I haven't used InsertChild at all in my code. I always add beginInsertRows
> before append child and endInsertRows after it's appended. In this line,
> the app is crashing.
>
> >This seems wrong, your leaf items dont have any children.
>
> I intentionally returned True. When the user expands the item I connect
> with the server and check for children and if it doesn't have any children,
> No children text is added to the tree.
>
> Do you know how can I view the crash report in PyQt? Thanks
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170520/10b89878/attachment.html>


More information about the PyQt mailing list