org::kde::kirigami::CardsGridView

Search for usage in LXR

org::kde::kirigami::CardsGridView Class Reference
Inheritance diagram for org::kde::kirigami::CardsGridView:

Properties

int columns
 
alias delegate
 
bool extraColumns
 
int maximumColumns
 
int maximumColumnWidth
 
int minimumColumnWidth
 

Additional Inherited Members

- Public Member Functions inherited from QtQuick.GridView
 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.

See also
CardsLayout
Since
2.4

Definition at line 27 of file CardsGridView.qml.

Property Documentation

int org::kde::kirigami::CardsGridView::columns

This property holds the the number of columns the gridview has.

Since
2.5
Remarks
This property is read-only

Definition at line 42 of file CardsGridView.qml.

alias org::kde::kirigami::CardsGridView::delegate

This property holds the delegate of the CardsGridView.

See also
QtQuick.ListView::delegate
Remarks
This is the default property

Definition at line 84 of file CardsGridView.qml.

bool org::kde::kirigami::CardsGridView::extraColumns

Fill first row with columns even when there is not enough delegates to fully fill the row (width).

When true it will automatically fill the row with columns, when false there will be as many columns as there are delegates when on enough space. default: true

Definition at line 36 of file CardsGridView.qml.

int org::kde::kirigami::CardsGridView::maximumColumns

This property holds the maximum number of columns.

By default there is not limit.

Since
2.5

Definition at line 50 of file CardsGridView.qml.

int org::kde::kirigami::CardsGridView::maximumColumnWidth

This property holds the maximum width 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.

By default this is 20 * Kirigami.Units.gridUnit.

Definition at line 63 of file CardsGridView.qml.

int org::kde::kirigami::CardsGridView::minimumColumnWidth

This property holds the minimum width the columns may have.

The cards will never become smaller than this size.

If the default needs to be overridden for some reason, it is advised to express this unit as a multiple of Kirigami.Units.gridUnit.

By default this is 12 * Kirigami.Units.gridUnit.

Since
2.5

Definition at line 77 of file CardsGridView.qml.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Dec 7 2021 22:34:45 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.