+ if (!leftSoftKey) {
+ // Add new action as left softkey
+ leftSoftKey = new QAction(label, this);
+ leftSoftKey->setSoftKeyRole(QAction::PositiveSoftKey);
+ connect(leftSoftKey, SIGNAL(triggered()), receiver, slot);
+ addAction(leftSoftKey);
+ } else {
+ if (!menuBar) {
+ // Create menu bar
+ menuBar = new QMenuBar(this);
+ // Add previous LSK to menu bar
+ leftSoftKey->setSoftKeyRole(QAction::NoSoftKey);
+ menuBar->addAction(leftSoftKey);
+ }
+ // Add new action to menu bar
+ QAction *action = new QAction(label, this);
+ connect(action, SIGNAL(triggered()), receiver, slot);
+ menuBar->addAction(action);