ComboBoxControl QML Type
A drop-down selector for editing enum and domain-value properties. More...
| Import Statement: | import QtInterfaceFramework.ControlPanelHelper 1.0 |
| Inherits: |
Properties
- isEnumModel : bool
- value : var
- valueModel : var
Signals
- valueActivated(var value)
Detailed Description
ComboBoxControl provides a styled ComboBox that can operate in two modes: enum mode and domain mode. In enum mode (isEnumModel set to true), it expects a ListModel whose elements have name and value roles. In domain mode it accepts a plain JavaScript array of values.
The control automatically synchronises the selected index when the value property changes externally, and emits valueActivated when the user picks a new entry.
Usage
With an enum model
ComboBoxControl {
isEnumModel: true
valueModel: climateModule.airflowDirectionsModel
value: backend.airflowDirection
onValueActivated: function(val) {
backend.setAirflowDirection(val)
}
}With a domain list
ComboBoxControl {
valueModel: ["Economy", "Comfort", "Sport"]
value: backend.driveMode
onValueActivated: function(val) {
backend.setDriveMode(val)
}
}Property Documentation
isEnumModel : bool
This property controls whether the valueModel is treated as an enum ListModel (with name and value roles) or as a plain JavaScript array.
By default, the property is set to false.
value : var
This property holds the currently selected value. Setting this property programmatically updates the selected index to match.
By default, the property is set to null.
valueModel : var
This property holds the model that provides the selectable values.
When isEnumModel is true, this must be a ListModel with name and value roles. Otherwise it should be a plain JavaScript array.
By default, the property is set to null.
Signal Documentation
valueActivated(var value)
This signal is emitted when the user selects a new entry from the drop-down. The value parameter contains the selected value.
Note: The corresponding handler is onValueActivated.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.