Results 1 to 2 of 2

Thread: Displaying the File menu for Draged TreeWidget items

  1. #1
    Join Date
    May 2009
    Posts
    129

    Default Displaying the File menu for Draged TreeWidget items

    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..
    Qt Code:
    1. if((ui->treeWidget->currentItem()!= ui->treeWidget->topLevelItem(0))&&(ui->treeWidget->currentItem()!= ui->treeWidget->topLevelItem(1)))
    2. {
    3. for (int i=0;i < ui->treeWidget->topLevelItem(0)->childCount();i++)
    4. {
    5. if(ui->treeWidget->currentItem() == ui->treeWidget->topLevelItem(0)->child(i))
    6. {
    7. fileMenu->exec(QCursor::pos());
    8. return;
    9. }
    10. }
    11. }
    12. else if(ui->treeWidget->currentItem() == ui->treeWidget->topLevelItem(0))
    13. {
    14.  
    15. group_menu->exec(QCursor::pos());
    16. }
    17. else
    18. {
    19. for(int i =0; i<ui->treeWidget->toplevelItem(1)->childCount();i++)
    20. {
    21. if(ui->treeWidget->currentItem == ui->treeWidget->toplevelItem(1).child(i))
    22. {
    23. conference_menu->exec(QCursor::pos());
    24. return;
    25. }
    26. }
    27. }
    28. }
    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

  2. #2
    Join Date
    May 2009
    Posts
    129

    Default Re: Displaying the File menu for Draged TreeWidget items

    Can anybody give me a solution to solve this issue


    Thanks

    Yuvaraj R

Similar Threads

  1. efficient way to store menu items in file
    By h123 in forum Qt Programming
    Replies: 5
    Last Post: 24th July 2009, 07:52
  2. Replies: 2
    Last Post: 2nd April 2008, 18:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.