Results 1 to 2 of 2

Thread: Context Menu With QTreeWidget (Require to display action menu on selected ITem only)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2011
    Posts
    20
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Context Menu With QTreeWidget (Require to display action menu on selected ITem only)

    Hi All.

    I need your help in urgent basis.As i am trying to add context menu on treewidget item and i want that this option comes only on leaf node of the widget.As in attached picture its is showing.

    Presently when i made right click on anywhere of project section it gives me the Link Analysis option but instead of that i want only in selected leaf node i.e. 9831024567.

    Currently using following code which is giving me link analysis option.

    void XmlTreeView::setcontextMenu()
    {
    treeWidget->setContextMenuPolicy(Qt::ActionsContextMenu);
    linkAct = new QAction("&LinkAnalysis",treeWidget);
    linkAct->setStatusTip("Perform Link Analysis");
    treeWidget->addAction(linkAct);
    }

    Please let me inform if you require any more information.

    Looking for prompt response.

    Thanks in advance.

    regards,
    Lekhraj
    Attached Images Attached Images

  2. #2
    Join Date
    Sep 2011
    Posts
    20
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Context Menu With QTreeWidget (Require to display action menu on selected ITem on

    Guy's could you please help me on above issue.

Similar Threads

  1. Menu item action problem
    By waynew in forum Newbie
    Replies: 5
    Last Post: 15th December 2010, 00:42
  2. Display action as menu item without icon?
    By bmueller63 in forum Qt Programming
    Replies: 0
    Last Post: 21st October 2010, 21:51
  3. Context Menu on Item Delegate
    By LynneV in forum Qt Programming
    Replies: 3
    Last Post: 12th February 2010, 16:52
  4. QTreeWidget Context Menu
    By ^NyAw^ in forum Qt Programming
    Replies: 2
    Last Post: 11th May 2007, 12:24
  5. Action on menu to display ui
    By jochen_r in forum Newbie
    Replies: 10
    Last Post: 10th January 2006, 11:10

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.