Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Random crashes in Qt 5.9.3 when qsortfilterproxymodel is used in QstackedWidget
UserOm last edited by
It seems either Qt4.8 and Qt5 have a bug or I am missing something. I have a QStackedWidget that displays data in tabular form (one page leading to the next page). I use qsortfilterproxymodel for sorting. I followed the standard from Qt http://doc.qt.io/qt-5/qsortfilterproxymodel.html and have different tables in my project working flawlessly. Except for the tables in QStackedWidget. They work fine initially but eventually they crash when I go deep into stacked widget (front page <-> next page <-> next page <-> previous page <-> front page). It crashes random sometimes when I am going back and forth. On my front page I have different search options that I use that can directly take me to the 2nd or 3rd page of the stack. When I use these options, the crash occurs randomly on some page. If I do not use the Qsortfilterproxymodel, application work fine. Its just while using the Qsortfilterproxymodel in a Qstackedwidget that makes my application crash. After I googled I found https://bugreports.qt.io/browse/QTBUG-45697 which is very similar to what I am facing. The bug seems to be fixed in 5.6 which is why I upgraded from Qt 4.8 to Qt 5.9.3 but I am still facing the same issues. Any idea for a possible solution ? I am on a Windows 64 bit machine using the 64 bit Qt built on MSVC2017 64 bit and using the Visual C++ compiler 15.0 (amd64). Also many times when this crash happens and I try to look at the stack in my Qt creator 4.4.1, the creator itself crashes. Thank you so much for your help.
Hi and welcome to devnet,
Can you share a minimal compilable examples that shows that behaviour ?