m_clearAllAction
= new QAction(tr
("Clear all history"),
this);
connect(m_clearAllAction,SIGNAL(triggered()), this, SLOT(clearSearchHistory()) );
menu->addAction(m_clearAllAction);
menu->addAction(tr("About"), this, SLOT(about()));
m_clearAllAction->setEnabled(false);
myMenuKey
->setSoftKeyRole
(QAction::PositiveSoftKey);
myMenuKey->setMenu(menu);
addAction(myMenuKey );
exitAction
->setSoftKeyRole
(QAction::NegativeSoftKey);
addAction(exitAction );
connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
QMenu* menu = new QMenu(this);
m_clearAllAction = new QAction(tr("Clear all history"), this);
connect(m_clearAllAction,SIGNAL(triggered()), this, SLOT(clearSearchHistory()) );
menu->addAction(m_clearAllAction);
menu->addAction(tr("About"), this, SLOT(about()));
m_clearAllAction->setEnabled(false);
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 );
connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
To copy to clipboard, switch view to plain text mode
Thanks in advance,
Bookmarks