FormComboBoxDelegate
Public Types | |
enum class | DisplayMode { ComboBox , Dialog , Page } |
Properties | |
Component | comboBoxDelegate |
alias | count |
alias | currentIndex |
alias | currentText |
alias | currentValue |
string | description |
Component | dialog |
Component | dialogDelegate |
int | displayMode |
alias | displayText |
alias | editable |
alias | editText |
alias | highlightedIndex |
var | model |
Component | page |
var | status |
string | statusMessage |
alias | textRole |
alias | valueRole |
Signals | |
void | accepted () |
void | activated (int index) |
Public Member Functions | |
void | closeDialog () |
void | indexOfValue (value) |
Detailed Description
A Form delegate that corresponds to a combobox.
This component is used for individual settings that can have multiple possible values shown in a vertical list, typically defined in a model.
Many of its properties require familiarity with QtQuick.Controls.ComboBox.
Use the inherited QtQuick.Controls.AbstractButton.text property to define the main text of the combobox.
If you need a purely on/off toggle, use a FormSwitchDelegate instead.
If you need an on/off/tristate toggle, use a FormCheckDelegate instead.
If you need multiple toggles instead of multiple values for the same setting, consider using a FormRadioDelegate.
- Since
- KirigamiAddons 0.11.0
- See also
- QtQuick.Controls.AbstractButton
- FormSwitchDelegate
- FormCheckDelegate
- FormRadioDelegate
Definition at line 38 of file FormComboBoxDelegate.qml.
Member Enumeration Documentation
◆ DisplayMode
|
strong |
The enum used to determine the displayMode.
Definition at line 140 of file FormComboBoxDelegate.qml.
Property Documentation
◆ comboBoxDelegate
|
read |
The delegate component to use as entries in the combobox display mode.
Definition at line 171 of file FormComboBoxDelegate.qml.
◆ count
|
read |
This property holds the count
of the internal combobox.
- See also
- QtQuick.Controls.ComboBox.count
- Since
- Kirigami Addons 1.4.0
Definition at line 86 of file FormComboBoxDelegate.qml.
◆ currentIndex
|
read |
This property holds the currentIndex
of the internal combobox.
default: -1
when the model has no data, 0
otherwise
- See also
- QtQuick.Controls.ComboBox.currentIndex
Definition at line 106 of file FormComboBoxDelegate.qml.
◆ currentText
|
read |
This property holds the text of the current item in the combobox.
- See also
- displayText
Definition at line 71 of file FormComboBoxDelegate.qml.
◆ currentValue
|
read |
This property holds the value of the current item in the combobox.
Definition at line 65 of file FormComboBoxDelegate.qml.
◆ description
|
read |
A label that contains secondary text that appears under the inherited text property.
This provides additional information shown in a faint gray color.
This is supposed to be a short text and the API user should avoid making it longer than two lines.
Definition at line 61 of file FormComboBoxDelegate.qml.
◆ dialog
|
read |
The dialog component used for the combobox.
This property allows to override the internal dialog with a custom component.
Definition at line 223 of file FormComboBoxDelegate.qml.
◆ dialogDelegate
|
read |
The delegate component to use as entries for each value in the dialog and page display mode.
Definition at line 175 of file FormComboBoxDelegate.qml.
◆ displayMode
|
read |
This property holds what display mode the delegate should show as.
Set this property to the desired DisplayMode.
default: FormComboBoxDelegate.ComboBox
- See also
- DisplayMode
Definition at line 167 of file FormComboBoxDelegate.qml.
◆ displayText
|
read |
This property holds the displayText
of the internal combobox.
This can be used to slightly modify the text to be displayed in the combobox, for instance, by adding a string with the currentText.
- See also
- QtQuick.Controls.ComboBox.displayText
Definition at line 120 of file FormComboBoxDelegate.qml.
◆ editable
|
read |
This property holds the editable
property of the internal combobox.
This turns the combobox editable, allowing the user to specify existing values or add new ones.
Use this only when displayMode is set to FormComboBoxDelegate.ComboBox.
- See also
- QtQuick.Controls.ComboBox.editable
Definition at line 132 of file FormComboBoxDelegate.qml.
◆ editText
|
read |
This property holds the editText
property of the internal combobox.
- See also
- QtQuick.Controls.ComboBox.editText
Definition at line 138 of file FormComboBoxDelegate.qml.
◆ highlightedIndex
|
read |
This property holds the highlightedIndex
of the internal combobox.
- See also
- QtQuick.Controls.ComboBox.highlightedIndex
Definition at line 112 of file FormComboBoxDelegate.qml.
◆ model
|
read |
This property holds the model providing data for the combobox.
- See also
- displayText
- QtQuick.Controls.ComboBox.model
- Models and Views in QtQuick
Definition at line 79 of file FormComboBoxDelegate.qml.
◆ page
|
read |
The page component used for the combobox, if applicable.
This property allows to override the internal Kirigami.ScrollablePage with a custom component.
Definition at line 230 of file FormComboBoxDelegate.qml.
◆ status
|
read |
This property holds the current status message type of the text field.
This consists of an inline message with a colorful background and an appropriate icon.
The status property will affect the color of statusMessage used.
Accepted values:
Kirigami.MessageType.Information
(blue color)Kirigami.MessageType.Positive
(green color)Kirigami.MessageType.Warning
(orange color)Kirigami.MessageType.Error
(red color)
default: Kirigami.MessageType.Information
if statusMessage is set, nothing otherwise.
- See also
- Kirigami.MessageType
- Since
- 1.5.0
Definition at line 197 of file FormComboBoxDelegate.qml.
◆ statusMessage
|
read |
This property holds the current status message of the text field.
If this property is not set, no status will be shown.
- Since
- 1.5.0
Definition at line 206 of file FormComboBoxDelegate.qml.
◆ textRole
|
read |
This property holds the textRole
of the internal combobox.
- See also
- QtQuick.Controls.ComboBox.textRole
Definition at line 92 of file FormComboBoxDelegate.qml.
◆ valueRole
|
read |
This property holds the valueRole
of the internal combobox.
- See also
- QtQuick.Controls.ComboBox.valueRole
Definition at line 98 of file FormComboBoxDelegate.qml.
Member Function Documentation
◆ accepted
|
signal |
This signal is emitted when the Return or Enter key is pressed while an editable combo box is focused.
- See also
- editable
◆ activated
|
signal |
This signal is emitted when the item at index
is activated by the user.
◆ closeDialog()
void FormComboBoxDelegate::closeDialog | ( | ) |
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:49:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.