Results 1 to 3 of 3

Thread: menu entry which could disable all submenu entries

  1. #1
    Join Date
    Jul 2008
    Location
    Munich
    Posts
    73
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Question menu entry which could disable all submenu entries

    I have a menu, its entry can activate or deactivate other functionalities. Now I want to group some functionalities into one menu entry, and the activate and deactivate could be done more conveniently. That is to say, click menu entry "group1" will trigger the activate or deactivate its sub entries. But its sub entries have their own activate or deactivate functionalities, as before.

    Anyone knows this? Thanks.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: menu entry which could disable all submenu entries

    Look at QActionGroup. Put all of the QAction instance that you want to be connected into a QActionGroup, and enable or disable the group. Each QAction can still be enabled or disabled independently.

  3. #3
    Join Date
    Jul 2008
    Location
    Munich
    Posts
    73
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: menu entry which could disable all submenu entries

    Thanks very much.
    I am going to search for that.

    Quote Originally Posted by d_stranz View Post
    Look at QActionGroup. Put all of the QAction instance that you want to be connected into a QActionGroup, and enable or disable the group. Each QAction can still be enabled or disabled independently.

Similar Threads

  1. how to add a submenu to a context menu of a QTableWidget
    By berlinud in forum Qt Programming
    Replies: 1
    Last Post: 18th October 2010, 14:38
  2. Replies: 2
    Last Post: 7th July 2010, 12:18
  3. Context Menu's submenu doesn't appear
    By DancingFirefly in forum Qt Programming
    Replies: 0
    Last Post: 19th August 2009, 20:32
  4. Replies: 1
    Last Post: 23rd July 2008, 10:19
  5. QPopup menu--inserting submenu's
    By Pharell in forum Qt Programming
    Replies: 1
    Last Post: 18th September 2007, 14:07

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.