Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Wiki Markup
{alias:qsetmenu}
h2. Name

*qsetmenu* — assign menu to object

h2. Syntax
{panel:|borderStyle=solid|borderWidth=1|bgColor=#FFFFAA}

*qsetmenu* _widget_ \[_menu_]

*qsetmenu* _treewidget menu_ \[_itemtype_]

{panel}

h2. Description

The *qsetmenu* command assigns a [QMenu] to a widget or tree item. 

h2. Arguments

_widget_
{indent}The target widget to receive the action object. This must be an [QAction], [QPushButton], [QToolButton], or [QTreeWidget]. If the widget is a QTreeWidget the menu will appear when the user clicks on the tree background. 
{indent}

_menu_
{indent}The menu to be assigned. This must be an instance of [QMenu]. 

itemtype
The tree widget item type. This is an integer corresponding the type parameter supplied in the [QTreeWidgetItem] command. The menu will be a right-click menu for all items having this type. 

{indent} 

h2. Examples

See [qmainwindow] for examples on how to use the *qsetmenu* command. 

{pagebreak}

Name

qsetmenu — assign menu to object

Syntax

Panel
bgColor#FFFFAA
borderWidth1
borderStylesolid

qsetmenu widget [menu]

qsetmenu treewidget menu [itemtype]

Description

The qsetmenu command assigns a QMenu to a widget or tree item.

Arguments

widget

menu

Examples

See qmainwindow for examples on how to use the qsetmenu command.