Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtquickcontrols-input.qdoc
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5 \page qtquickcontrols-input.html
6 \title Input Controls
7 \ingroup qtquickcontrols-guidelines
8 \brief Guidelines for input controls
9
10 Qt Quick Controls offers a variety of input controls for both numeric
11 and textual input.
12
13 \annotatedlist qtquickcontrols-input
14
15 Each type of input control has its own specific target use case. The
16 following sections offer guidelines for choosing the appropriate type
17 of input control, depending on the use case.
18
19 \section1 ComboBox Control
20
21 \image qtquickcontrols-combobox.gif
22 {Combo box expanding to show dropdown list}
23
24 \l ComboBox is used to select a value from a static multiple-line drop-down list.
25 It is not possible to add new values, and only one option can be selected.
26
27 Recommendations:
28 \list
29 \li If the number of values is very large, consider applying a filter.
30 \li If the list is very limited, consider using RadioButton. This has the
31 advantage that the user can see all options at the same time.
32 \li Select a default value, the value that will be chosen most often.
33 \endlist
34
35 \b {See also} \l {CheckBox Control}, \l {Tumbler Control}.
36
37 \section1 Dial Control
38
39 \image qtquickcontrols-dial.png
40 {Dial control for circular value selection}
41
42 \l Dial is similar to a traditional dial knob that is found on devices such
43 as stereos or industrial equipment.
44
45 The dial is rotated by clicking and dragging, with the handle indicating the
46 value of the dial.
47
48 For applications where fast input is important, the circular
49 \l {Dial::inputMode}{input mode} is useful, as clicking on the dial will
50 move it directly to that position.
51
52 For applications where precise input is important, the horizontal and
53 vertical input modes are recommended, as these allow small adjustments to
54 be made relative to where the dial is clicked. These modes are also better
55 for dials where large jumps in values could be unsafe, such as a dial that
56 controls audio volume.
57
58 \b {See also} \l {Tumbler Control}.
59
60 \section1 TextArea Control
61
62 \image qtquickcontrols-textarea.png
63 {Text area for multiline text input}
64
65 \l TextArea is a multi-line text editor.
66
67 \section1 TextField Control
68
69 \image qtquickcontrols-textfield.png
70 {Text field for single line text input}
71
72 \l TextField is a single line text editor.
73
74 \b {See also} \l {Tumbler Control}.
75
76 \section1 Slider Control
77
78 \image qtquickcontrols-slider.gif
79 {Slider handle moving along track}
80
81 \l Slider is used to select a value by sliding a handle along a track.
82
83 \section1 RangeSlider Control
84
85 \image qtquickcontrols-rangeslider.gif
86 {Range slider with two handles defining range}
87
88 \l RangeSlider is used to select a range specified by two values,
89 by sliding each handle along a track.
90
91 \b {See also} \l {Slider Control}.
92
93 \section1 Tumbler Control
94
95 \image qtquickcontrols-tumbler.png
96 {Tumbler showing scrollable value selection}
97
98 \l Tumbler is a spinnable wheel of items that can be selected.
99
100 \b {See also} \l {ComboBox Control}.
101
102 \section1 Related Information
103 \list
104 \li \l {Qt Quick Controls Guidelines}
105 \endlist
106*/