On this page

ListControl QML Type

An editor for list<type> properties with add, remove, and edit functionality. More...

Import Statement: import QtInterfaceFramework.ControlPanelHelper 1.0
Inherits:

ColumnLayout

Properties

Signals

Detailed Description

ListControl displays a scrollable list of items with numbered indices. It supports primitives (int, real, string, bool), enums, and structs. Each item is rendered using the appropriate control based on elementType, and struct items can be expanded inline.

Usage

ListControl {
    elementType: "int"
    listValue: backend.sensorReadings
    onListChanged: function(newList) {
        backend.setSensorReadings(newList)
    }
}

With structs

ListControl {
    elementType: "struct"
    listValue: backend.waypoints
    structType: {
        "name": "Waypoint",
        "fields": [
            { name: "lat", type: "real" },
            { name: "lon", type: "real" }
        ]
    }
    onListChanged: function(newList) {
        backend.setWaypoints(newList)
    }
}

Property Documentation

elementType : string

This property defines the type of each list element. Accepted values are "string", "int", "real", "bool", "enum", and "struct".

enumModel : var

This property holds the enum model used when elementType is "enum".

listValue : var

This property holds the JavaScript array of list items.

structType : var

This property holds the struct descriptor used when elementType is "struct". It should be a JavaScript object with name and fields keys.

Signal Documentation

listChanged(var newList)

This signal is emitted when items are added, removed, or modified. The newList parameter contains the updated array.

Note: The corresponding handler is onListChanged.

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