Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QSortFilterProxyModel segmentation fault when updating source model



  • Hi All,

    My app crashes with a segmentation fault when I try to update the source model after implementing QSortFilterProxyModel. I'm not accessing any indexes directly, just updating the source model with a call to the db. What am I doing wrong?

    Regards,
    Delvian


  • Lifetime Qt Champion

    @delvian If your app is crashing first thing to do is to use the debugger.
    Without more information it is impossible to say why your app is crashing, so please use debugger first. You also can post the stack trace here after the crash.



  • I figured it out after reading the C++ docs. The Qt for Python docs doesn't mention that you need to emit the layoutAboutToBeChanged signal first.


Log in to reply