org::kde::kirigami::CardsGridView

Properties | |
int | columns |
alias | delegate |
bool | extraColumns |
int | maximumColumns |
int | maximumColumnWidth |
int | minimumColumnWidth |
Additional Inherited Members | |
![]() | |
add () | |
forceLayout () | |
int | indexAt (x, real y) |
Item | itemAt (x, real y) |
Item | itemAtIndex (index) |
moveCurrentIndexDown () | |
moveCurrentIndexLeft () | |
moveCurrentIndexRight () | |
moveCurrentIndexUp () | |
positionViewAtBeginning () | |
positionViewAtEnd () | |
positionViewAtIndex (index, PositionMode mode) | |
remove () | |
Detailed Description
CardsGridView is used to display a grid of Cards generated from any model.
The behavior is same as CardsLayout, and it allows cards to be put in one or two columns depending on the available width.
GridView has the limitation that every Card must have the same exact height, so cellHeight must be manually set to a value in which the content fits for every item.
If possible use cards only when you don't need to instantiate a lot and use CardsLayout instead.
- Since
- org.kde.kirigami 2.4
Definition at line 30 of file CardsGridView.qml.
Property Documentation
◆ columns
|
read |
This property holds the number of columns the gridview has.
- Since
- org.kde.kirigami 2.5
- Remarks
- This property is read-only
Definition at line 47 of file CardsGridView.qml.
◆ delegate
|
read |
This property holds the delegate of the CardsGridView.
- See also
- GridView.delegate
- Remarks
- This is the default property
Definition at line 92 of file CardsGridView.qml.
◆ extraColumns
|
read |
This property sets whether the view should fill the first row with columns even when there is not enough space.
Set this to true
if you want to stop the view from filling the first row with columns, even when delegates can't even fill the first row.
default: true
Definition at line 41 of file CardsGridView.qml.
◆ maximumColumns
|
read |
This property holds the maximum number of columns the gridview may have.
default: Kirigami.Units.maximumInteger()
- Since
- org.kde.kirigami 2.5
Definition at line 55 of file CardsGridView.qml.
◆ maximumColumnWidth
|
read |
This property holds the maximum width that the columns may have.
The cards will never become wider than this size; when the GridView is wider than maximumColumnWidth, it will switch from one to two columns.
If the default needs to be overridden for some reason, it is advised to express this unit as a multiple of Kirigami.Units.gridUnit.
default: 20 * Kirigami.Units.gridUnit
Definition at line 68 of file CardsGridView.qml.
◆ minimumColumnWidth
|
read |
This property holds the minimum width that the columns may have.
The cards will never become thinner than this.
If the default needs to be overridden for some reason, it is advised to express this unit as a multiple of Kirigami.Units.gridUnit.
default: 12 * Kirigami.Units.gridUnit
- Since
- org.kde.kirigami 2.5
Definition at line 82 of file CardsGridView.qml.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 30 2023 03:58:28 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.