Banner QML Type
An banner Item with support for informational, positive, warning and error types, and with support for associated actions. More...
Import Statement: | import org.kde.kirigamiaddons.labs.components |
Status: | Deprecated |
This type is deprecated. We strongly advise against using it in new code.
Properties
- actions : list<Kirigami.Action>
- hoveredLink : string
- showCloseButton : bool
- text : string
- title : string
- type : Kirigami.MessageType
Signals
- linkActivated(string link)
- linkHovered(string link)
Detailed Description
Banner can be used to inform or interact with the user without requiring the use of a dialog and are positionned in the footer or header of a page. For inline content, see Kirigami.InlineMessage.
The Banner is hidden by default.
Optionally, actions can be added which are shown alongside an optional close button on the right side of the Item. If more actions are set than can fit, an overflow menu is provided.
Example usage:
Banner { type: Kirigami.MessageType.Error text: "My error message" actions: [ Kirigami.Action { icon.name: "edit" text: "Action text" onTriggered: { // do stuff } }, Kirigami.Action { icon.name: "edit" text: "Action text" onTriggered: { // do stuff } } ] }
Since 1.5.0, use Kirigami.InlineMessage with the appropriate position
property.
Property Documentation
actions : list<Kirigami.Action> |
This property holds the list of Kirigami Actions to show in the banner's internal ActionToolBar.
Actions are added from left to right. If more actions are set than can fit, an overflow menu is provided.
hoveredLink : string |
This property holds the link embedded in the message text that the user is hovering over.
showCloseButton : bool |
This property holds whether the close button is displayed.
text : string |
This property holds the message text.
title : string |
This property holds the message title.
type : Kirigami.MessageType |
This property holds the message type.
The following values are allowed:
Constant | Value |
---|---|
Kirigami.MessageType.Information | |
Kirigami.MessageType.Positive | |
Kirigami.MessageType.Warning | |
Kirigami.MessageType.Error |
Signal Documentation
linkActivated(string link) |
This signal is emitted when a link is clicked or tapped in the message text.
Note: The corresponding handler is onLinkActivated
.
linkHovered(string link) |
This signal is emitted when a link is hovered in the message text.
Note: The corresponding handler is onLinkHovered
.