TextControl QML Type
A text input control for editing string, integer, and real properties. More...
| Import Statement: | import QtInterfaceFramework.ControlPanelHelper 1.0 |
| Inherits: |
Properties
- typedValue : var
- valueType : string
Detailed Description
TextControl provides a styled text field with built-in input validation based on the property type. It is the default control used by the simulation control panel for properties that do not have a more specific editor (such as enums, booleans, or ranges).
The control automatically applies the appropriate IntValidator or DoubleValidator depending on the valueType, and exposes a typedValue property that returns the text content parsed into the correct JavaScript type.
Usage
TextControl inherits from TextField, so all standard TextField properties such as text, placeholderText, and signals such as editingFinished are available.
TextControl {
valueType: "int"
text: backend.speed
onEditingFinished: backend.setSpeed(text)
}Property Documentation
typedValue : var
This property holds the current text content parsed into the JavaScript type corresponding to valueType. For "int" it returns an integer, for "real" a floating-point number, and for "string" the raw text string.
valueType : string
This property defines the expected type for input validation and parsing. Accepted values are "string", "int", and "real".
When set to "int", an IntValidator is applied and only integer input is accepted. When set to "real", a DoubleValidator is applied and decimal input is accepted. When set to "string" (the default), no validator is applied.
By default, the property is set to "string".
© 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.