ComboBox QML Type
A styled combo box with Fluent Design dropdown. More...
| Import Statement: | import FluentUI 1.0 |
Properties
- accentColor : var
- currentIndex : int
- currentText : string
- editable : bool
- font : font
- highlighted : bool
- model : var
- textRole : string
Signals
- void activated(int index)
- void highlightedIndexChanged(int index)
Methods
- void popup()
Detailed Description
ComboBox is a QML component that extends QtQuick.Controls.ComboBox with Fluent Design theme support. It provides a drop-down list selection control that automatically applies the current theme's colors, typography, and corner radius. The dropdown popup is styled with elevation shadow and animation.
Usage Example
import QtQuick import FluentUI ComboBox { model: ["Option 1", "Option 2", "Option 3"] currentIndex: 0 }
See also QtQuick.Controls.ComboBox.
Property Documentation
accentColor : var
The accent color used for the dropdown indicator and selection highlight. When set, this overrides the accent color provided by the parent's FluentUI attached properties.
currentIndex : int
The index of the currently selected item. This property is inherited from QtQuick.Controls.ComboBox.
currentText : string
The text of the currently selected item. This property is inherited from QtQuick.Controls.ComboBox.
editable : bool
Whether the combo box is editable, allowing the user to type custom text. The default value is false. This property is inherited from QtQuick.Controls.ComboBox.
font : font
The font used for the combo box text. This property is inherited from QtQuick.Controls.ComboBox.
highlighted : bool
Whether the combo box is rendered with highlighted styling, typically indicating it is the primary control in a group. The default value is false.
model : var
The model providing the items for the combo box. This property is inherited from QtQuick.Controls.ComboBox.
textRole : string
The model role used to display text for each item. This property is inherited from QtQuick.Controls.ComboBox.
Signal Documentation
void activated(int index)
Emitted when an item is selected from the popup. The index parameter indicates the index of the activated item.
Note: The corresponding handler is onActivated.
void highlightedIndexChanged(int index)
Emitted when the highlighted index changes during keyboard or mouse navigation through the popup items.
Note: The corresponding handler is onHighlightedIndexChanged.
Method Documentation
void popup()
Opens the combo box dropdown popup programmatically.