Results 1 to 3 of 3

Thread: QTreeWidget Context Menu

  1. #1
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default QTreeWidget Context Menu

    Hi,

    I'm trying to show a context Menu on a QTreeWidget when there is a right mouse click. The problem is that I want to show different menus depending on the item that was clicked.

    I know that I can disable the action but I don't want to see this action. So I want to know if there is a way to create different context Menus or have I to create the actions depending on the item that was clicked.

    Thanks for any idea
    Òscar Llarch i Galán

  2. #2
    Join Date
    Oct 2006
    Posts
    279
    Thanks
    6
    Thanked 40 Times in 39 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTreeWidget Context Menu

    Are you aware of QAction::setVisible ( bool )?

  3. #3
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QTreeWidget Context Menu

    Hi,

    Wow,

    Thanks!
    Òscar Llarch i Galán

Similar Threads

  1. Context Menu on QTableWidget
    By ankurjain in forum Qt Programming
    Replies: 9
    Last Post: 17th December 2009, 09:52
  2. Misplaced Context Menu
    By kandalf in forum Qt Programming
    Replies: 6
    Last Post: 18th February 2007, 04:28
  3. menu on right click on canvas
    By quickNitin in forum Newbie
    Replies: 4
    Last Post: 8th October 2006, 12:09
  4. context menu advice
    By larry104 in forum Qt Programming
    Replies: 1
    Last Post: 4th October 2006, 07:55
  5. Q3TextEdit custom context menu
    By bcteh_98 in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2006, 21:00

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.