On this page

SpinControl QML Type

A numeric spin box control for editing bounded integer properties. More...

Import Statement: import QtInterfaceFramework.ControlPanelHelper 1.0
Inherits:

ColumnLayout

Properties

Signals

Detailed Description

SpinControl provides a styled SpinBox with increment and decrement buttons and optional minimum/maximum labels displayed above the input. It is used by the simulation control panel for properties annotated with @range, @minimum, or @maximum in the QFace IDL.

The spin box is editable by default, allowing the user to type a value directly or use the + and - buttons.

Usage

SpinControl {
    from: 0
    to: 255
    value: backend.brightness
    onValueModified: function(value) {
        backend.setBrightness(value)
    }
}

Property Documentation

editable : alias

This property holds whether the user can type a value directly into the spin box.

By default, the property is set to true.

from : int

This property holds the minimum allowed value.

By default, the property is set to the minimum 32-bit signed integer value (-2147483648).

showMinMaxLabels : bool

This property controls whether the minimum and maximum labels are displayed above the spin box.

By default, the property is set to true.

to : int

This property holds the maximum allowed value.

By default, the property is set to the maximum 32-bit signed integer value (2147483647).

value : int

This property holds the current value of the spin box.

By default, the property is set to 0.

Signal Documentation

valueModified(int value)

This signal is emitted when the user modifies the value, either by typing, clicking the + / - buttons, or using the keyboard arrows. The value parameter contains the new value.

Note: The corresponding handler is onValueModified.

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