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

void QWidget::addAction ( QAction action  )  [inherited]

Appends the action action to this widget's list of actions.

All QWidgets have a list of {QAction}s, however they can be represented graphically in many different ways. The default use of the QAction list (as returned by actions()) is to create a context QMenu.

A QWidget should only have one of each action.

See also:
removeAction(), insertAction(), actions(), QMenu

Definition at line 2575 of file qwidget.cpp.

References QWidget::insertAction().

Referenced by Q3ActionGroup::addTo(), Q3Action::addTo(), QAbstractFormBuilder::create(), MainWindow::createContextMenu(), QToolButton::setDefaultAction(), QPushButton::setMenu(), QToolButton::setMenu(), and ShapedClock::ShapedClock().

{
    insertAction(0, action);
}


Generated by  Doxygen 1.6.0   Back to index