Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2011

    Why QAction menu can not be displayed or refreshed?

    In my program i use QAction to create the menu on bottom of the widget UI.
    When first enter the widget, the menu is OK. Push some button(button function will change the menu) and change the menu then the menu can not be displayed. Push some other button/text/scrollarea(respone function will not change the menu) then the menu will be displayed.

    In my program, in the showEvent function, i will change the menu according to the current state.
    in the create menu function, here are the steps:
    1. remove the old action menu. such as:
    while(pModel->parentWidget()->actions().length() > 0)
    2. create some new action menu.
    m_cancel = new QAction(trUtf8("取消"), pModel->parentWidget() );

    3. call widget update function. such as:

    When debug the codes i found that: the create function runs OK, when from screen no new action menu be displayed and only a default menu "Exit" display on the right. when click the "exit" the software exit. But if i click other QScrollArea then my menu action will be show and can work OK.

    I don't know why, any body can help?

  2. #2
    Nokia Developer Expert
    Join Date
    Sep 2011

    Re: Why QAction menu can not be displayed or refreshed?

    Actions with a softkey role defined are only visible in the softkey bar when the widget containing the action has focus. If no widget currently has focus, the softkey framework will traverse up the widget parent hierarchy looking for a widget containing softkey actions.

    By default action have have QAction::NoSoftKey role, a change to cancel->setSoftKeyRole( QAction::NegativeSoftKey ); may also help.


Similar Threads

  1. Camera View finder not refreshed
    By nemi in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2011-05-11, 13:45
  2. How to change application icon displayed on the menu (urgent)?
    By okegame in forum Symbian Tools & SDKs
    Replies: 9
    Last Post: 2010-01-16, 14:14
  3. CEikRichTextEditor not refreshed until scroll
    By nadav70 in forum Symbian User Interface
    Replies: 4
    Last Post: 2008-06-23, 07:56
  4. Menu are not displayed
    By alok_bbk in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-10-15, 09:39

Posting Permissions

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