When triggered, this action sends a signal (default 'Clicked') with a custom string as parameter. The connected slot can then act depending on this parameter.
The DAction class has this constructor:
name,icon=None,data=None,signal=None) |
If the DAction is used in a menu, a name is sufficient. For use in a toolbar, you will probably want to specify an icon. When the action is triggered, the data is sent as a parameter to the SLOT function connected with the 'Clicked' signal. If no data is specified, the name is used as data.
See the views.py module for an example.
DAction objects have the following methods:
) |