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...
void MainWindow
::RemoveTreeRoot(QString Filename
) {
QList<QTreeWidgetItem *>TempRoot=ui->treeWidget_FilesSelected->findItems(Filename,Qt::MatchExactly,0);
{
cout<<"ITS FOUND!!!!!!!!!!!!!!!!"<<endl;
std::cout<<"remove:"<<temp->text(0).toStdString()<<endl; ///PRINTING CORRECT NODE NAME....
ui->treeWidget_FilesSelected->removeItemWidget(temp,0); // <----This effect not reflecting in mainwindow while executing
}
}
void MainWindow::RemoveTreeRoot(QString Filename)
{
QList<QTreeWidgetItem *>TempRoot=ui->treeWidget_FilesSelected->findItems(Filename,Qt::MatchExactly,0);
foreach (QTreeWidgetItem *temp,TempRoot)
{
cout<<"ITS FOUND!!!!!!!!!!!!!!!!"<<endl;
std::cout<<"remove:"<<temp->text(0).toStdString()<<endl; ///PRINTING CORRECT NODE NAME....
ui->treeWidget_FilesSelected->removeItemWidget(temp,0); // <----This effect not reflecting in mainwindow while executing
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks