[Qt-interest] QList is crashing when detructed?

Eric Clark eclark at ara.com
Sat Jun 27 22:25:59 CEST 2009


Hello All,

Can anyone explain why my code is crashing when a QModelIndexList returned from a call to QItemSelectionModel::selectedIndexes() is deleted? The code looks similar to this:

void Foo()
{
  QModelIndexList list = mySelectionModel->selectedIndexes();
  ...
}

I do actually do something with the list, but this code crashes even if there is only the one line in it. The code crashes in the destructor of the QList, it says that some memory is being freed more than once.

Any help would be greatly appreciated!

Thanks,
Eric

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090627/ecba8f85/attachment.html 


More information about the Qt-interest-old mailing list