Card QML Type
Card with a standard layout. More...
Import Statement: | import org.kde.kirigami |
Inherits: |
Properties
- actions : list<T.Action>
- banner
- banner.source : url
- banner.title : string
- banner.titleAlignment : Qt.Alignment
- banner.titleIcon : string
- banner.titleLevel : int
- banner.titleWrapMode : QtQuick.Text.wrapMode
Detailed Description
Card implements a particular standardized layout inside an AbstractCard, with pre-defined header and footer items.
The header is an image that can contain an optional title and icon, accessible via the banner grouped property.
The footer will show a series of ToolButtons (and eventually an overflow menu) representing the action
property's actions.
Override the contentItem
with the content you want to be displayed in the card between the pre-made header and footer.
Overriding the header
and footer
properties is discouraged, as this will result in the title
, icon
, and actions
properties having no effect.
If you want to make your own completely custom layout, use AbstractCard instead.
Property Documentation
actions : list<T.Action> |
This property holds the clickable actions that will be available in the footer.
The actions will be represented by a list of ToolButtons with an overflow menu when not all of them will fit in the available space.
default: null
; set it to define some actions.
banner group |
---|
banner.source : url |
banner.title : string |
banner.titleAlignment : Qt.Alignment |
banner.titleIcon : string |
banner.titleLevel : int |
banner.titleWrapMode : QtQuick.Text.wrapMode |
This grouped property controls the banner image present in the header.
It also has the full set of properties that QtQuick.Image has, such as sourceSize and fillMode.
- source: The source for the image. It understands any URL valid for an Image component.
- titleIcon: The optional icon to put in the banner, either a freedesktop-compatible icon name (recommended) or any URL supported by QtQuick.Image.
- title: The title for the banner, shown as contrasting text over the image.
- titleAlignment: The alignment of the title inside the image. Default:
Qt.AlignTop | Qt.AlignLeft
. - titleLevel: The Kirigami.Heading level for the title, ranging from 1 (big) to 5 (small). Default:
1
. - titleWrapMode: Whether the header text should be able to wrap. Default:
Text.NoWrap
.