Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Apr 2010
    Surat, India

    How to change menu at run time?

    I have a menu having 5 Actions on MainWindow. There are 5 widgets which I am using with QStackedLayout. Each action is associated with one widget.

    Now if I setCurrentIndex of my stackLayout to 2 then I want to disable 1 Action from menu and I want to remove 1 action from menu. How can I do this? But if user switches back to previous index then I want to add actions again. This can happen again & again as user is free to switch between index of stackLayout.
    Rahul Kulshreshtha
    Please choose Notification type as "Instant Email Notification". It must be default.

  2. #2
    Super Contributor
    Join Date
    Oct 2009

    Re: How to change menu at run time?

    Use QWidget::removeAction()
    Adding action to a menu is as simple as calling QMenu::addAction().

Similar Threads

  1. Changing the option menu at run time
    By nmnir in forum Symbian User Interface
    Replies: 2
    Last Post: 2010-03-29, 21:43
  2. How to add and remove menu items on run time
    By somnathbanik in forum Symbian
    Replies: 1
    Last Post: 2009-06-04, 09:41
  3. application icon change at run time...
    By chandra1234 in forum Symbian
    Replies: 2
    Last Post: 2008-12-23, 09:53
  4. Menu in Form Run-time Error
    By mubx2000 in forum Symbian User Interface
    Replies: 52
    Last Post: 2007-04-25, 12:24
  5. how to change caption text in run time
    By kain64bt in forum Symbian
    Replies: 3
    Last Post: 2007-03-02, 07:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts