Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

Name

qsetmenu — assign menu to object

Syntax

qsetmenu widget [menu]

qsetmenu treewidget menu [itemtype]

Description

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

Arguments

widget

The target widget to receive the action object. This must be an qactionqpushbuttonqtoolbutton, or qtreewidget. If the widget is a QTreeWidget the menu will appear when the user clicks on the tree background.

menu

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.

Examples

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

  • No labels