FormComboBoxDelegate QML Type

A Form delegate that corresponds to a ComboBox. More...

Import Statement: import org.kde.kirigamiaddons.formcard
Inherits:

AbstractFormDelegate

Properties

Signals

Methods

Detailed Description

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 ComboBox.

Use the inherited 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.

See also AbstractButton, FormSwitchDelegate, FormCheckDelegate, and FormRadioDelegate.

Property Documentation

comboBoxDelegate : Component

The delegate component to use as entries in the ComboBox display mode.


count : int

This property holds the count of the internal ComboBox.


currentIndex : int

This property holds the currentIndex of the internal ComboBox.

Default: -1 when the model has no data, 0 otherwise


currentText : string

This property holds the currentText of the internal ComboBox.

See also displayText.


currentValue : var

This property holds the currentValue of the internal ComboBox.


description : string [default: ""]

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.


dialog : Component

The dialog component used for the ComboBox.

This property allows to override the internal dialog with a custom component.


dialogDelegate : Component

The delegate component to use as entries for each value in the dialog and page display mode.


displayMode : int [default: FormComboBoxDelegate.ComboBox]

This property holds what display mode the delegate should show as.

Set this property to the desired DisplayMode.

On mobile, displayMode defaults to FormComboBoxDelegate.Dialog.

ConstantDescription
FormComboBoxDelegate.ComboBoxA standard ComboBox component containing a vertical list of values.
FormComboBoxDelegate.DialogA button with similar appearance to a ComboBox that, when clicked, shows a Kirigami.OverlaySheet at the middle of the window containing a vertical list of values.
FormComboBoxDelegate.PageA button with similar appearance to a ComboBox that, when clicked, shows a Kirigami.ScrollablePage in a new window containing a vertical list of values.

displayText : string

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.


editText : string

This property holds the editText property of the internal ComboBox.


editable : bool

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.


highlightedIndex : int

This property holds the highlightedIndex of the internal ComboBox.


model : var

This property holds the model providing data for the ComboBox.

See also displayText and Models and Views in QtQuick.


page : Component

The page component used for the ComboBox, if applicable.

This property allows to override the internal Kirigami.ScrollablePage with a custom component.


status : var

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:

ConstantDescription
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.


statusMessage : string

This property holds the current status message of the text field.

If this property is not set, no status will be shown.


textRole : string

This property holds the textRole of the internal ComboBox.


valueRole : string

This property holds the valueRole of the internal ComboBox.


Signal Documentation

accepted()

This signal is emitted when the Return or Enter key is pressed while an editable combo box is focused.

Note: The corresponding handler is onAccepted.

See also editable.


activated(int index)

This signal is emitted when the item at index is activated by the user.

Note: The corresponding handler is onActivated.


Method Documentation

closeDialog()

Closes the dialog or layer.

This function can be used when reimplementing the page or dialog.