I am parsing every topLevelItem of QTreeWidget and adding it's text to a QList. But I am getting a segmentation fault when I try to add the text to the list.
Here is my code:
Qt Code:
QList<QString> ulist; QTreeWidgetItem *item; for(int x=0; x<ui->treeWidget->topLevelItemCount(); x++) { item = ui->treeWidget->topLevelItem(x-1); ulist.append(item->text(0)); }To copy to clipboard, switch view to plain text mode
Thanks in advance to anyone that may be able to help.
-Ryan
Bookmarks