Jeffb
10th April 2012, 13:27
Hi Guys
I have a tree model (QAbstractItemModel) with a QSortFilterProxyModel.
I've drag drop enabled it so that I can drag a node in the QTreeview and drop it under any other node in the same QTreeView.
It usually works fine except that occasionally it crashes during endInsertRows() with a bad memory access.
For instance, there is one scenario that will crash each time I run it, 9 times out of 10 but not absolutely every time.
During debug - whilst it crashes during endInsertRows() it appears to specifically crash at QSortFilterProxyModel::parent.
My question is does anyone have suggestions for what I should be looking for to fix this?
What exactly does endInsertRows() do?
There is probably no point in posting the code - there is a lot of it.
Thanks
Jeff
I have a tree model (QAbstractItemModel) with a QSortFilterProxyModel.
I've drag drop enabled it so that I can drag a node in the QTreeview and drop it under any other node in the same QTreeView.
It usually works fine except that occasionally it crashes during endInsertRows() with a bad memory access.
For instance, there is one scenario that will crash each time I run it, 9 times out of 10 but not absolutely every time.
During debug - whilst it crashes during endInsertRows() it appears to specifically crash at QSortFilterProxyModel::parent.
My question is does anyone have suggestions for what I should be looking for to fix this?
What exactly does endInsertRows() do?
There is probably no point in posting the code - there is a lot of it.
Thanks
Jeff