Action QML Type
Represents an action on a Plasmoid. More...
| Import Statement: | import org.kde.plasma.core |
Properties
- actionGroup : QActionGroup
- icon
- isSeparator : bool
- menu : QMenu
- shortcut : variant
Detailed Description
Unlike Qt Quick Controls' Action type, this is backed by a QAction.
Use this to define actions for a Plasmoid, such as Plasmoid.contextualActions or Plasmoid.setInternalAction
Example usage:
import org.kde.plasma.core as PlasmaCore
PlasmaCore.Action {
text: "Run"
icon.name: "system-run-symbolic"
onTriggered: runProcess()
}
Property Documentation
actionGroup : QActionGroup
See also QAction::actionGroup.
icon group
icon.icon : QIcon
icon.name : string
The icon for this action. Can be a system icon name (through icon.name) or a QIcon (through icon.icon).
isSeparator : bool
Defaults to false.
See also QAction::isSeparator.
menu : QMenu
See also QAction::setMenu.
shortcut : variant
The shortcut that can be used to activate this action. Can be a string describing a sequence (like "Ctrl+Shift+X") or a QKeySequence::StandardKey.