Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    QMenuBar shows "Actions" item

    Mobile and Embedded
    3
    3
    2084
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      xinevil last edited by

      Hi,

      I recently received a Nokia C7 (from the Qt Ambassador thingy) and I tried some simple stuff with it.
      I use Nokia SDK 1.1 beta, but something goes wrong.
      I just create a new project in Qt Creator, add some actions to the QMenuBar (using the Designer) and add a push button to switch styles, with the following code:
      @ if(isMaximized()) {
      showFullScreen();
      ui->modeLabel->setText(tr("Normal Fullscreen"));
      } else {
      Qt::WindowFlags flags = windowFlags();
      if(flags & Qt::WindowSoftkeysRespondHint) {
      flags |= Qt::WindowSoftkeysVisibleHint;
      flags &= ~Qt::WindowSoftkeysRespondHint;
      setWindowFlags(flags); // Hides visible window
      showFullScreen();
      ui->modeLabel->setText(tr("Fullscreen with softkeys"));
      } else if(flags & Qt::WindowSoftkeysVisibleHint) {
      flags &= ~Qt::WindowSoftkeysVisibleHint;
      flags &= ~Qt::WindowSoftkeysRespondHint;
      setWindowFlags(flags); // Hides visible window
      showMaximized();
      ui->modeLabel->setText(tr("Normal Maximized"));
      } else {
      flags &= ~Qt::WindowSoftkeysVisibleHint;
      flags |= Qt::WindowSoftkeysRespondHint;
      setWindowFlags(flags); // Hides visible window
      showFullScreen();
      ui->modeLabel->setText(tr("Fullscreen with SK respond"));
      }
      }@
      This code is copied from the softkeys example. Only in some modes my softkeys are shown.
      Anyway, when the softkey is shown, and I tap the "options" key, I get a strange "Actions" menu item. I can not get rid of it.
      Who knows what it is and how to get rid of it?

      1 Reply Last reply Reply Quote 0
      • J
        jbarron last edited by

        That is caused by a long standing bug (coudn't find it in JIRA though) in Qt where the "Actions" item in the softkey menu is supposed to represent the context menu for the widget that has focus. The way to remove it is to set the context menu policy to Qt::NoContextMenu Note that you might have to set this on more than one widget to get it to disappear completely.

        1 Reply Last reply Reply Quote 0
        • M
          milot.shala last edited by

          You can also look at "this ":http://developer.qt.nokia.com/wiki/Remove_actions_options_menu_in_Symbian wiki article that describes how to do it.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post