hi all,
i added root tree widget item dynamically,
when i tried to access, i can its name but when i tried to remove that root with specified name, the effect was not reflecting in window...
Please tell me what i'm missing here...
Qt Code:
  1. void MainWindow::RemoveTreeRoot(QString Filename)
  2. {
  3.  
  4. QList<QTreeWidgetItem *>TempRoot=ui->treeWidget_FilesSelected->findItems(Filename,Qt::MatchExactly,0);
  5. foreach (QTreeWidgetItem *temp,TempRoot)
  6. {
  7. cout<<"ITS FOUND!!!!!!!!!!!!!!!!"<<endl;
  8. std::cout<<"remove:"<<temp->text(0).toStdString()<<endl; ///PRINTING CORRECT NODE NAME....
  9. ui->treeWidget_FilesSelected->removeItemWidget(temp,0); // <----This effect not reflecting in mainwindow while executing
  10.  
  11. }
  12. }
To copy to clipboard, switch view to plain text mode