Input Controls

Guidelines for input controls

Qt Quick Controls offers a variety of input controls for both numeric and textual input.

qml-qtquick-controls2-combobox.html

Combined button and popup list for selecting options.

qml-qtquick-controls2-dial.html

Circular dial that is rotated to set a value.

qml-qtquick-controls2-rangeslider.html

Used to select a range of values by sliding two handles along a track.

qml-qtquick-controls2-slider.html

Used to select a value by sliding a handle along a track.

qml-qtquick-controls2-textarea.html

Multi-line text input area.

qml-qtquick-controls2-textfield.html

Single-line text input field.

qml-qtquick-controls2-tumbler.html

Spinnable wheel of items that can be selected.

Each type of input control has its own specific target use case. The following sections offer guidelines for choosing the appropriate type of input control, depending on the use case.

ComboBox Control

../_images/qtquickcontrols2-combobox.gif

ComboBox is used to select a value from a static multiple-line drop-down list. It is not possible to add new values, and only one option can be selected.

Recommendations:

  • If the number of values is very large, consider applying a filter.

  • If the list is very limited, consider using RadioButton . This has the advantage that the user can see all options at the same time.

  • Select a default value, the value that will be chosen most often.

See also CheckBox Control , Tumbler Control .

Dial Control

../_images/qtquickcontrols2-dial.png

Dial is similar to a traditional dial knob that is found on devices such as stereos or industrial equipment.

The dial is rotated by clicking and dragging, with the handle indicating the value of the dial.

For applications where fast input is important, the circular input mode is useful, as clicking on the dial will move it directly to that position.

For applications where precise input is important, the horizontal and vertical input modes are recommended, as these allow small adjustments to be made relative to where the dial is clicked. These modes are also better for dials where large jumps in values could be unsafe, such as a dial that controls audio volume.

See also Tumbler Control .

TextArea Control

../_images/qtquickcontrols2-textarea.png

TextArea is a multi-line text editor.

TextField Control

../_images/qtquickcontrols2-textfield.png

TextField is a single line text editor.

See also Tumbler Control .

Slider Control

../_images/qtquickcontrols2-slider.gif

Slider is used to select a value by sliding a handle along a track.

RangeSlider Control

../_images/qtquickcontrols2-rangeslider.gif

RangeSlider is used to select a range specified by two values, by sliding each handle along a track.

See also Slider Control .

Tumbler Control

../_images/qtquickcontrols2-tumbler.png

Tumbler is a spinnable wheel of items that can be selected.

See also ComboBox Control .