GridFormGroup QML Type
A container class for related rorm entries. When there is enough horizontal space, it will show the entries in a two columns grid. More...
| Import Statement: | import org.kde.kirigami.forms |
| Since: | 6.33 |
| Inherits: |
Properties
- background : Item
- columns : alias
- maximumColumns : alias
Detailed Description
Use this group when you want to have controls in two columns, they will be represented as a grid of little cards. This element should always be positioned in a Form. It is used to group together related form controls, to separate different settings categories.
A FormGroup should contain only elements of type FormEntry or FormSeparator (or derivates).
Example usage:
import QtQuick.Controls as QQC
import org.kde.kirigami as Kirigami
Kirigami.Form {
Kirigami.GridFormGroup {
title: "Theme Options"
Kirigami.FormEntry {
title: "Colors"
contentItem: QQC.CheckBox {
text: "Dark Theme"
}
}
Kirigami.FormEntry {
contentItem: QQC.CheckBox {
text: "High Contrast"
}
}
Kirigami.FormEntry {
contentItem: QQC.CheckBox {
text: "Show Sidebar"
}
}
Kirigami.FormEntry {
contentItem: QQC.CheckBox {
text: "Auto Save"
}
}
...
}
}
See also Form, FormEntry, and FormGroup.
Property Documentation
background : Item
Group background Item.
In the GridFormGroup when there is more than one column a different background for each entry will be drawn.
Sometimes it might be desiderable to vave groups without a background, such as when groups are inside a small popup dialog. in those cases set this property to null.
columns : alias [read-only]
How many columns the grid has in this moment.
maximumColumns : alias
This property holds the maximum number of columns.
This layout will never lay out the items in more columns than maximumColumns, when there is not enough space it might use less columns
default: 2