I'm wanting to unselect the only (1) selected item in my QTreeWidget,
but when I use my code, It returns:
ASSERT failure in QList<T>::at: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 439
Here is my code:
Qt Code:
if(ui->treeWidget->selectedItems().count()>0) { i->setSelected(0); }To copy to clipboard, switch view to plain text mode
Is there something wrong with my code? It looks right to me...
Added after 1 41 minutes:
It seems to me that there is something wrong with the QTreeWidget. But I'm not sure.
Bookmarks