# class KActionMenu

###

Module | kdeui
Namespace |
Class | KActionMenu
Inherits | KAction

A KActionMenu is an action that has several properties specific to holding a sub-menu of other actions.

Any QAction can be used to create a submenu.

Plugged in a popupmenu, it will create a submenu. Plugged in a toolbar, it will create a button with a popup menu.

This is the action used by the XMLGUI since it holds other actions. If you want a submenu for selecting one tool among many (without icons), see KSelectAction. See also setDelayed about the main action.

### methods

- KActionMenu (parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QObject |

- KActionMenu (text, parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  text | QString |
  parent | QObject |

- KActionMenu (icon, text, parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  icon | KIcon |
  text | QString |
  parent | QObject |

- KActionMenu (a0)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QObject |

- addAction (action)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  action | QAction |

- addSeparator ( )

  returns QAction

- createWidget (parent)

  returns QWidget

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget |

- delayed ( )

  returns bool

  Returns true if this action creates a delayed popup menu when plugged in a KToolBar.

- insertAction (before, action)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  before | QAction |
  action | QAction |

- insertSeparator (before)

  returns QAction

  Argument | Type | Default
  --- | --- | ---
  before | QAction |

- menu ( )

  returns KMenu

  Returns this action's menu as a KMenu, if it is one. If none exists, one will be created.

- popupMenu ( )

  returns KMenu

  Returns this action's menu as a KMenu, if it is one. If none exists, one will be created. Deprecated use menu() instead.

- remove (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | KAction |

  Deprecated

- removeAction (action)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  action | QAction |

- setDelayed (delayed)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  delayed | bool |

  If set to true, this action will create a delayed popup menu when plugged in a KToolBar. Otherwise it creates a normal popup. Default: delayed

  Remember that if the "main" action (the toolbar button itself) cannot be clicked, then you should call setDelayed(false).

  In the other case, if the main action can be clicked, it can only happen in a toolbar: in a menu, the parent of a submenu can't be activated. To get a "normal" menu item when plugged a menu (and no submenu) use KToolBarPopupAction.

- setMenu (menu)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  menu | KMenu |

- setStickyMenu (sticky)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  sticky | bool |

  If set to true, this action will create a sticky popup menu when plugged in a KToolBar. "Sticky", means it's visible until a selection is made or the mouse is clicked elsewhere. This feature allows you to make a selection without having to press and hold down the mouse while making a selection. Default: sticky.

- stickyMenu ( )

  returns bool

  Returns true if this action creates a sticky popup menu.

  See also setStickyMenu().