Unknown macro: {alias}
Name
qaddaction — add action to widget
Syntax
qaddaction widget [action]
qaddaction widget name commands
Description
The qaddaction command adds a QAction object to a widget. Widgets may handle this differently. Instances of QWidget will display their actions in a right-click menu, while QMenus will have their actions listed as menu items.
Arguments
widget
action
name
commands
Examples
Adding an action to a menu
# Get the Geocap help menu. This could be any menu set helpmenu [mainwindow helpmenu] # Add an item named "Hello" to the menu. The commands are the statements found inside the braces. qaddaction $helpmenu "Hello" { qinformation Hello "Hello there!" }
See qmainwindow for examples on how to use the qaddaction command. See the qaction command for information on how to create action objects.