Code:
Qt::WindowFlags flags = windowFlags();
flags |= Qt::WindowSoftkeysVisibleHint;
setWindowFlags(flags);
m_menu = new QMenu(this);
m_menu->setStyleSheet("background-color: #fff");
m_menu->addAction("Logout", this, SLOT(on_logout_clicked()));
QAction *optionsAction = new QAction("Options", this);
optionsAction->setMenu(m_menu);
optionsAction->setSoftKeyRole(QAction::PositiveSoftKey);
addAction(optionsAction);
QAction *backSoftKeyAction = new QAction(QString("Back"), this);
backSoftKeyAction->setSoftKeyRole(QAction::NegativeSoftKey);
QObject::connect(backSoftKeyAction, SIGNAL(triggered()), this, SLOT(previousView()));
addAction(backSoftKeyAction);
Help me with the following: