Hi All
I dragged the items to Toplevelitem 1 from toplevelitem 0 in TreeWidget..When the current item is child of toplevel item 1, i am displaying the file menu..
I am working with..
if((ui->treeWidget->currentItem()!= ui->treeWidget->topLevelItem(0))&&(ui->treeWidget->currentItem()!= ui->treeWidget->topLevelItem(1)))
{
for (int i=0;i < ui->treeWidget->topLevelItem(0)->childCount();i++)
{
if(ui->treeWidget->currentItem() == ui->treeWidget->topLevelItem(0)->child(i))
{
return;
}
}
}
else if(ui->treeWidget->currentItem() == ui->treeWidget->topLevelItem(0))
{
}
else
{
for(int i =0; i<ui->treeWidget->toplevelItem(1)->childCount();i++)
{
if(ui->treeWidget->currentItem == ui->treeWidget->toplevelItem(1).child(i))
{
conference_menu
->exec
(QCursor::pos());
return;
}
}
}
}
if((ui->treeWidget->currentItem()!= ui->treeWidget->topLevelItem(0))&&(ui->treeWidget->currentItem()!= ui->treeWidget->topLevelItem(1)))
{
for (int i=0;i < ui->treeWidget->topLevelItem(0)->childCount();i++)
{
if(ui->treeWidget->currentItem() == ui->treeWidget->topLevelItem(0)->child(i))
{
fileMenu->exec(QCursor::pos());
return;
}
}
}
else if(ui->treeWidget->currentItem() == ui->treeWidget->topLevelItem(0))
{
group_menu->exec(QCursor::pos());
}
else
{
for(int i =0; i<ui->treeWidget->toplevelItem(1)->childCount();i++)
{
if(ui->treeWidget->currentItem == ui->treeWidget->toplevelItem(1).child(i))
{
conference_menu->exec(QCursor::pos());
return;
}
}
}
}
To copy to clipboard, switch view to plain text mode
I tried with with different ways it is showing Conference menu except Dragged item.
Please help me
Thanks
Yuvaraj R
Bookmarks