On this page

StructField QML Type

A single-field editor row used inside StructControl. More...

Import Statement: import QtInterfaceFramework.ControlPanelHelper 1.0
Inherits:

RowLayout

Properties

Signals

Detailed Description

StructField displays a label with the field name and loads the appropriate editing control based on fieldType. Supported types are "string", "int", "real", "bool", "enum", and "list". It is used internally by StructControl and ModelControl.

Usage

StructField {
    fieldName: "temperature"
    fieldType: "real"
    fieldValue: 22.5
    onFieldChanged: function(value) {
        backend.setTemperature(value)
    }
}

Property Documentation

enumModel : var

This property holds the enum model used when fieldType is "enum". It should be a ListModel with name and value roles.

fieldName : string

This property holds the label text displayed beside the control.

fieldType : string

This property defines which editor control is loaded. Accepted values are "string", "int", "real", "bool", "enum", and "list".

fieldValue : var

This property holds the current value of the field.

listElementType : string

This property holds the element type used when fieldType is "list", for parsing comma-separated input.

Signal Documentation

fieldChanged(var value)

This signal is emitted when the user modifies the field value. The value parameter contains the new value.

Note: The corresponding handler is onFieldChanged.

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