[Qt-interest] How to hide softkey menu on Symbian?
Tomasz Baniak
thomas.baniak at gmail.com
Fri Dec 3 13:00:33 CET 2010
Hi Alessandro
Proposed solution is not the case. I want this app to work exactly how it
works now.
So i am happy to have a menu under the softkey that will pop up when
clicked.
I just want it (popup, NOT softkey) to hide it programatically without
having to delete it.
Scenario:
1) User opens app -> app with SK is opened
2) User clicks SK -> menu pops up
3) While menu is visible 'something' happens so i would like my app to
close/hide preciously shown menu
Tomek
2010/12/3 <alessandro.portale at nokia.com>
> Hi,
>
> as a workaround, I believe you can set the action as a context action of
> your main widget/dialog/window . The action should appear as softkey and not
> open any submenu
> http://doc.qt.nokia.com/4.7/qwidget.html#softkeys
>
> Hope that helps,
> Alessandro
> ________________________________________
> From: qt-interest-bounces at trolltech.com [qt-interest-bounces at trolltech.com]
> On Behalf Of ext Tomasz Baniak [thomas.baniak at gmail.com]
> Sent: Friday, December 03, 2010 11:06
> To: qt-interest at trolltech.com
> Subject: [Qt-interest] How to hide softkey menu on Symbian?
>
> Hi!
>
> I would like to hide a softkey menu (NOT a softkey, but a menu that is
> possibly shown) on Symbian (to avoid bug
> http://bugreports.qt.nokia.com/browse/QTBUG-14589).
>
> I did not succeed to do it in my app. I checked it on simple app with left
> softkey menu constructed as this:
> QMenu* m_menu;
> ...
> m_menu = new QMenu(this);
> m_menu->addAction("Option 1", this, SLOT(menuItemTriggered()));
> m_menu->addAction("Option 2", this, SLOT(menuItemTriggered()));
> m_menu->addAction("Option 3", this, SLOT(menuItemTriggered()));
> QAction *myMenuKey = new QAction("MyMenu", this);
> myMenuKey->setSoftKeyRole(QAction::PositiveSoftKey);
> myMenuKey->setMenu(m_menu);
> menuBar()->addAction(myMenuKey);
> and could not hide it in any way.
>
> I have tried:
> m_menu->close();
> m_menu->hide();
> m_menu->setVisible(false);
> without any success
>
> It seems that Symbian uses it's native menu and it has not much to do with
> QMenu i used in a code above as it is possible to open MyMenu by clicking
> action key and display it and in the same moment display second
> 'instance'(?!) of the same menu by calling popup() (2 menus with the same
> options visible).
> On Windows the above situation works as expected (only 1 menu visible at
> time).
> Also calling (on Windows) hide/close does the trick to actually hide it.
>
> I will fill the bug later for 'double menu issue' later. But back to my
> question:
> How could i hide this left softkey menu on Symbian?
>
> Tomek
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101203/24aaa90b/attachment.html
More information about the Qt-interest-old
mailing list