TitleSubtitle QML Type
A simple item containing a title and subtitle label. More...
| Import Statement: | import org.kde.kirigami.delegates |
Properties
- color : color
- elide : int
- font : font
- reserveSpaceForSubtitle : bool
- selected : bool
- subtitle : string
- subtitleColor : color
- subtitleFont : font
- subtitleVisible : bool
- title : string
- truncated : bool
- wrapMode : int
Signals
- linkActivated(string link)
- linkHovered(string link)
Detailed Description
This is mainly intended as a replacement for a list delegate content item, but can be used as a replacement for other content items as well.
When using it as a contentItem, make sure to bind the appropriate properties to those of the Control. Prefer binding to the Control's properties over setting the properties directly, as the Control's properties may affect other things like setting accessible names.
Example usage as contentItem of an ItemDelegate:
ItemDelegate { id: delegate text: "Example" contentItem: Kirigami.TitleSubtitle { title: delegate.text subtitle: "This is an example." font: delegate.font selected: delegate.highlighted || delegate.down } }
See also IconTitleSubtitle and ItemDelegate.
Property Documentation
color : color
The color to use for the title.
By default this is Kirigami.Theme.textColor unless selected is true in which case this is Kirigami.Theme.highlightedTextColor.
elide : int
The text elision mode used for both the title and subtitle.
font : font
The font used to display the title.
reserveSpaceForSubtitle : bool
Make the implicit height use the subtitle's height even if no subtitle is set.
selected : bool
Should this item be displayed in a selected style?
subtitle : string
The subtitle to display.
subtitleColor : color
The color to use for the subtitle.
By default this is color mixed with the background color.
subtitleFont : font
The font used to display the subtitle.
subtitleVisible : bool [read-only]
Is the subtitle visible?
title : string [required]
The title to display.
truncated : bool [read-only]
Is the title or subtitle truncated?
wrapMode : int
The text wrap mode used for both the title and subtitle.
Signal Documentation
linkActivated(string link)
Emitted when the user clicks on a link embedded in the text of the title or subtitle.
Note: The corresponding handler is onLinkActivated.
linkHovered(string link)
Emitted when the user hovers on a link embedded in the text of the title or subtitle.
Note: The corresponding handler is onLinkHovered.