You remove it by deleting it, i.e. delete ui->treeWidget->currentItem().
Your crashed is probably since the removeChild method deletes the current item, which you refer to when finding the parent. I.e. you return into a function which no longer has a valid context.





Reply With Quote
Bookmarks