FormGridContainer QML Type
This component render a grid of small cards. More...
- Import Statement: import org.kde.kirigamiaddons.formcard
- Inherits: Item
Detailed Description
This is used to display multiple information in a FormCard.FormLayout without taking too much vertical space.
Form delegates can also be placed directly inside the container. In this mode, delegates are displayed in a two-column grid, each with its own card background.
import org.kde.kirigamiaddons.formcard as FormCard
FormCard.FormGridContainer {
id: container
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.fillWidth: true
infoCards: [
FormCard.FormGridContainer.InfoCard {
title: "42"
subtitle: i18nc("@info:Number of Posts", "Posts")
},
FormCard.FormGridContainer.InfoCard {
title: "42"
subtitle: i18nc("@info:Number of followers.", "Followers")
}
]
}
import org.kde.kirigamiaddons.formcard as FormCard
FormCard.FormGridContainer {
FormCard.FormTextDelegate {
text: "Name"
}
FormCard.FormSwitchDelegate {
text: "Enable notifications"
}
}
Property Documentation
[default: 0] bottomPadding : real
Padding property used around the content edges.
[read-only] cardWidthRestricted : bool
This property holds whether the card's width is being restricted.
delegates : list<Item>
The form delegates displayed in the container. When left empty, controls added as children are included, even after construction.
[default: 0] horizontalPadding : real
Padding property used around the content edges.
[default: 0] leftPadding : real
Padding property used around the content edges.
[default: Kirigami.Units.gridUnit * 30] maximumWidth : real
This property holds the maximum width of the grid.
[default: 0] padding : real
Padding property used around the content edges.
[default: 0] rightPadding : real
Padding property used around the content edges.
[default: 0] topPadding : real
Padding property used around the content edges.
[default: 0] verticalPadding : real
Padding property used around the content edges.