Fluid 1.3.0
Material Design for QtQuick and Qml
Loading...
Searching...
No Matches
ButtonGroup Class Reference

A horizontal Material 3 Expressive group of buttons. More...

Inheritance diagram for ButtonGroup:

Detailed Description

A horizontal Material 3 Expressive group of buttons.

ButtonGroup accepts direct Button and IconButton children. Standard groups space independent actions and animate a pressed button's width. Connected groups provide segmented selection with shared outer geometry.

The group owns child size, shape, checkability, selection accessibility, and roving focus. It leaves button type, icon, text, width variant, colors, and enabled state untouched. Invalid selected indexes are removed, duplicates are collapsed, and indexes are sorted. Single selection retains the first index; required selection chooses the first enabled visible child, then the first child when necessary. Selection follows child objects across insertions and removals whenever possible.

Arrow keys move in visual order and wrap; Home and End move to the logical bounds. Space and Enter activate the focused child.

MD.ButtonGroup {
MD.Button { text: qsTr("Back") }
MD.Button { text: qsTr("Next") }
}
MD.ButtonGroup {
variant: MD.ButtonGroup.Connected
selectionMode: MD.ButtonGroup.SingleSelection
selectionRequired: true
MD.Button { text: qsTr("Day") }
MD.Button { text: qsTr("Week") }
}

Definition at line 40 of file ButtonGroup.qml.


The documentation for this class was generated from the following file: