[Qt-interest] Displaying the File menu for Draged TreeWidget items
Yuvaraj R
yuvaraj at ongobiz.com
Tue Jul 28 08:09:36 CEST 2009
Hi All
Please Can anybody give me a solution for this issue.
Thanks
Yuvaraj R
On Mon, Jul 27, 2009 at 7:01 PM, Yuvaraj R <yuvaraj at ongobiz.com> wrote:
> 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/20090728/37ec1fa3/attachment.html
More information about the Qt-interest-old
mailing list