How exactly are you trying to display the menu? What is myMenuKey?
Hi,
myMenuKey is a QAction. As in my code snippet, I am trying to add two menu options "Clear All History" and "About" using QMenu::addAction()
And I am creating two new QAction for "Options" and "Exit" as below and setting the two menu actions "Clear All History" and "About" to "Options"
QAction* myMenuKey = new QAction(tr("Options"), this);
myMenuKey->setSoftKeyRole(QAction::PositiveSoftKey);
myMenuKey->setMenu(menu);
addAction(myMenuKey );
QAction* exitAction = new QAction(tr("Exit"), this);
exitAction->setSoftKeyRole(QAction::NegativeSoftKey);
addAction(exitAction );
Thanks in advance,
Reshma
I can see it's a QAction. But where do you put it after you create it? What's the "this" object?
Hi,
"this" is a QWidget. QActions are added to the QWidget.
Regards,
Reshma
I know it's a widget but what widget is it? I'm not asking about the class name but the role it has in your program. Also, does the "Exit" action work? Maybe the problem is with the soft keys?
Hi Wysota,
Yes exactly, problem is with softkeys. I can't see them on the Meego device. The same Qt piece of code works for Symbian devices and I see the softkeys. How can I get this to work for Meego?
QWidget is the main widget in my application. I want to add some softkeys to this widget to perform certain actions.
Thanks in advance,
Reshma
As far as I understand it soft keys are only supported on Symbian. At least that's what the docs are suggesting.
Bookmarks