View Full Version : Problem when creating different sofy keys on different tabs

31st July 2010, 12:54

I was trying to create different softkeys on different Tabs. Creating the softkeys was fine but however until I press on one of the widgets the softkeys aren't visible. Here is how my code looks like

QMainWindow *mainWindow = new QMainWIndow;
QTabWidget *central = new QTabWidget;
xTab = new QWidget;
yTab = new QWidget;
connect(central, SIGNAL(currentChanged(int)), this, SLOT(onTabChanged(int)));


void onTabChanged(int index)
if(index ==1)
sKey1 = new QAction(yTab);
skey1->setSoftKeyRole(QAction:: PositiveSoftKey);

This skey1 softkey I created in yTab is visible only when I click on one of the widgets inside the tab.
However if I add the sKey1 to central it displays properly but as I need to have different soft keys appear on different tabs that doesn't work.
I really appreciate if anyone can provide any ideas/suggestions.