TitleSubtitleWithActions QML Type

A simple title delegate that has trailing actions. More...

Import Statement: import org.kde.kirigami.delegates
Since: 6.22
Inherits:

Item

Properties

Detailed Description

This is meant to be used in lists for items that have actions. For example lists of usernames, with any related actions after them, such as rename and delete actions.

Example usage as contentItem of an ItemDelegate:

 ItemDelegate {
     id: itemDelegate
     icon: "user"
     text: i18nc("@title:row", "Konqi")
     readonly property string subtitle: i18nc("@label", "The Konqueror")
     Accessible.description: subtitle
     Kirigami.Theme.useAlternateBackgroundColor: true

     onClicked: [...]

     contentItem: Kirigami.TitleSubtitleWithActions {
         title: itemDelegate.title
         subtitle: itemDelegate.subtitle
         elide: Text.ElideRight
         selected: itemDelegate.pressed || itemDelegate.highlighted
         actions: [
             Kirigami.Action {
                 icon.name: "edit-entry-symbolic"
                 text: i18nc("@action:button", "Modify user…")
                 onTriggered: [...]
                 tooltip: text
             },
             Kirigami.Action {
                 icon.name: "edit-delete-remove-symbolic"
                 text: i18nc("@action:button", "Remove user…")
                 onTriggered: [...]
                 tooltip: text
                 displayHint: Kirigami.DisplayHint.IconOnly
             }
         ]
     }
 }

See also IconTitleSubtitle, TitleSubtitle, and ActionToolBar.

Property Documentation

actions : list<Action>

This property holds a list of visible actions.

These actions will be given to ActionToolBar. To make an action be icons-only, set displayHint: Kirigami.DisplayHint.IconOnly on it.

Empty by default, so no actions will be present.

See also ActionToolBar.


displayHint : enumeration

This property determines how the icon and text are displayed within the button.

Permitted values are:

  • Button.IconOnly
  • Button.TextOnly
  • Button.TextBesideIcon
  • Button.TextUnderIcon

default: Button.TextBesideIcon

See also ActionToolBar and AbstractButton.


elide : enumeration

The text elision mode used for both the title and subtitle.

default: Text.ElideRight


selected : bool

Should this item be displayed in a selected style?

default: false


subtitle : string

The subtitle to display.

default: Empty string, so no subtitle is shown


title : string [required]

The title to display.