Class Theme::QfToggleButtonGroup
ClassList > Theme > QfToggleButtonGroup
Inherits the following classes: QtQuick::Item
Public Properties
| Type | Name |
|---|---|
| property bool | allowDeselect |
| property bool | allowMultipleSelection |
| property real | buttonMininumWidth |
| property real | buttonSpacing |
| property string | checkedRole |
| property bool | editable |
| property bool | editing |
| property alias | font |
| property alias | model |
| property int | selectedIndex |
| property string | textRole |
Public Signals
| Type | Name |
|---|---|
| signal void | itemDeselected |
| signal void | itemSelected (int index, var modelData) |
Detailed Description
Provides a consistent UI for selecting single values from a list of options.
Import Statement
import Theme
Version:
1.0
Public Properties Documentation
property allowDeselect
bool Theme::QfToggleButtonGroup::allowDeselect;
When true, clicking on an already-selected button will deselect it, setting selectedIndex to -1 and emitting the deselected() signal.
property allowMultipleSelection
bool Theme::QfToggleButtonGroup::allowMultipleSelection;
When true, multiple items can be selected, the checkedRole mdoel value will define whether a given index is selected or not.
property buttonMininumWidth
real Theme::QfToggleButtonGroup::buttonMininumWidth;
Minimum width for buttons to handle empty text gracefully
property buttonSpacing
real Theme::QfToggleButtonGroup::buttonSpacing;
Spacing between buttons
property checkedRole
string Theme::QfToggleButtonGroup::checkedRole;
property editable
bool Theme::QfToggleButtonGroup::editable;
property editing
bool Theme::QfToggleButtonGroup::editing;
property font
alias Theme::QfToggleButtonGroup::font;
property model
alias Theme::QfToggleButtonGroup::model;
property selectedIndex
int Theme::QfToggleButtonGroup::selectedIndex;
property textRole
string Theme::QfToggleButtonGroup::textRole;
Public Signals Documentation
signal itemDeselected
void Theme::QfToggleButtonGroup::itemDeselected;
Emitted when the user deselects the currently selected item (only when allowDeselect is true). The selectedIndex will be -1 after this signal is emitted.
signal itemSelected
void Theme::QfToggleButtonGroup::itemSelected;
Emitted when user selects a button
Parameters:
indexThe index of the selected itemmodelDataThe model data for the selected item
The documentation for this class was generated from the following file src/qml/imports/Theme/QfToggleButtonGroup.qml