A special popover presenting actions to the user. The popover is closed automatically when the action is chosen. More...
The actions can be given either using ActionList or as an array of action objects. The visualization of the actions is realized either using the default visualization, which is realised using list items having centered text, or using the component given as delegate. The actions are triggered with the specified target as parameter.
The popover recognizes the following properties from the delegate:
An example presenting list of actions using ActionList:
ActionSelectionPopover { delegate: ListItems.Standard { text: action.text } actions: ActionList { Action { text: "Action one" onTriggered: print(text) } Action { text: "Action two" onTriggered: print(text) } } }
An array of actions can be used when the actions to be presented are reused from a set of predefined actions:
Item { Action { id: action1 text: "Action one" onTriggered: print(text) } Action { id: action2 text: "Action two" onTriggered: print(text) } Action { id: action3 text: "Action three" onTriggered: print(text) } ActionListPopover { actions: [action1, action3] delegate: ListItems.Standard { text: action.text } } }
The property holds the list of actions to be presented. Each action triggered will use the actionHost as caller.
The property holds the delegate to visualize the action. The delegate should define one of the data holder properties recognized by the popover in order to access action data.