<div dir="ltr">I would like to add that I did test my model with the Model Tester provided here <a href="https://github.com/bgr/PyQt5_modeltest">https://github.com/bgr/PyQt5_modeltest</a> and didn't find any bugs. Thanks<br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 20, 2017 at 8:53 PM, Rathinam Signup <span dir="ltr"><<a href="mailto:tfa.signup.test@gmail.com" target="_blank">tfa.signup.test@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi all,</div><div><br></div><div>I did test the same code by porting it back to <b>PyQt4</b> and it works without any issues. So I can assure you that <b>the bug is with PyQt 5.6</b>. Can you please suggest some ways to view the crash report like in which thread the crash occured?</div><div><br></div><div>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.</div></div></blockquote></div><br></div></div>