[Qt-interest] Displaying the File menu for Draged TreeWidget items
Yuvaraj R
yuvaraj at ongobiz.com
Mon Jul 27 15:31:15 CEST 2009
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 for toplevel item 1's childs..
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))
{
fileMenu->exec(QCursor
<http://doc.trolltech.com/latest/QCursor.html>::pos());
return;
}
}
}
else if(ui->treeWidget->currentItem() == ui->treeWidget->topLevelItem(0))
{
group_menu->exec(QCursor
<http://doc.trolltech.com/latest/QCursor.html>::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
<http://doc.trolltech.com/latest/QCursor.html>::pos());
return;
}
}
}
}
I tried with with different ways it is showing Conference menu except
Dragged item.
Please help me
Thanks
Yuvaraj R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090727/9cd52188/attachment.html
More information about the Qt-interest-old
mailing list