Results 1 to 2 of 2

Thread: Can't check the action when it has a menu?

  1. #1
    Join Date
    May 2012
    Posts
    11
    Qt products
    Qt4

    Default Can't check the action when it has a menu?

    Qt Code:
    1. QMenu *menu = new QMenu;
    2. QMenu *subMenu = new QMenu;
    3. for (int i = 0; i < 6; i++)
    4. {
    5. QAction *action = new QAction(0);
    6. action->setCheckable(true);
    7. if (i == 3)
    8. {
    9. action->setMenu(subMenu);
    10. }
    11. menu->addAction(action);
    12. }
    To copy to clipboard, switch view to plain text mode 

    The action in the menu has a sub menu, when you active this action, only show the sub menu, but can't be checked, why?

  2. #2
    Join Date
    May 2012
    Posts
    11
    Qt products
    Qt4

    Default Re: Can't check the action when it has a menu?

    I am already have an idea, to reimplement the timerEvent.

Similar Threads

  1. Replies: 1
    Last Post: 4th November 2011, 11:25
  2. Replies: 4
    Last Post: 16th February 2011, 15:46
  3. Replies: 1
    Last Post: 29th November 2010, 15:47
  4. Action-Menu-Button
    By hgedek in forum Newbie
    Replies: 1
    Last Post: 1st October 2007, 16:41
  5. ToolBar Action With Menu
    By indifference in forum Qt Programming
    Replies: 4
    Last Post: 10th September 2007, 19:37

Tags for this Thread

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.