Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QMenuBar shows "Actions" item

QMenuBar shows "Actions" item

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 3 Posters 2.5k Views 1 Watching
  • 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 Offline
    X Offline
    xinevil
    wrote on last edited by
    #1

    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
    0
    • J Offline
      J Offline
      jbarron
      wrote on last edited by
      #2

      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
      0
      • M Offline
        M Offline
        milot.shala
        wrote on last edited by
        #3

        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
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved