Logo Search packages:      
Sourcecode: qt4-x11 version File versions

QAction * QMenu::addAction ( const QString text  )  [inherited]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This convenience function creates a new action with text. The function adds the newly created action to the menu's list of actions, and returns it.

See also:
QWidget::addAction()

Definition at line 1227 of file qmenu.cpp.

Referenced by QMenu::addAction(), QMenu::addMenu(), QMenu::addSeparator(), addWindow(), QScrollBar::contextMenuEvent(), QDialog::contextMenuEvent(), QMainWindow::createPopupMenu(), QLineEdit::createStandardContextMenu(), QMenu::exec(), and QtWindowListMenu().

{
    QAction *ret = new QAction(text, this);
    addAction(ret);
    return ret;
}


Generated by  Doxygen 1.6.0   Back to index