Hi Guys.
I got a problem with setting the menu on mobile devices.
That's the code i used in my "Mainwindow.cpp" :
When I start the simulator, it shows the right captions, but doesn't work, if i click on it.Code://///////////////////////////////////////////////////// // Options Menu QAction* options = new QAction(tr("Test Select"), this); QMenu *menuOptions = new QMenu(this); menuOptions->addAction(tr("Test 1"), this, SLOT(showIndex())); menuOptions->addAction(tr("Test 2"), this, SLOT(showIndex())); options->setMenu(menuOptions); /////////////////////////////////////////////////////// // Exit Action QAction* exit = new QAction(tr("Test Exit"), this); connect(exit, SIGNAL(triggered()), this, SLOT(showIndex())); // #if defined(Q_OS_SYMBIAN) // Set Soft Key locations // QAction::PositiveSoftKey = Left Soft Key // This will set the left soft key menu // options->setSoftKeyRole(QAction::PositiveSoftKey); options->setSoftKeyRole(QAction::PositiveSoftKey); // Add Actions Direct to dialog // QAction::NegativeSoftKey = Right Soft Key // This will set the right softkey caption and action addAction(options); addAction(exit);
I used the "showIndex()"-function in the Slots just for testing the menu.




