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
textinput.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 qtquick-input-textinput.html
6
\title Qt Quick Text Input Handling and Validators
7
\brief Text input and validation
8
9
\section1 Text Visual Types
10
11
Qt Quick provides several types to display text onto the screen. The \l Text
12
type will display formatted text onto the screen, the \l TextEdit type
13
will place a multiline line edit onto the screen, and the \l TextInput will
14
place a single editable line field onto the screen.
15
16
To learn more about their specific features and properties, visit their
17
respective documentation.
18
19
\section1 Validating Input Text
20
21
The \e validator types enforce the type and format of
22
\l TextInput objects.
23
24
\annotatedlist qtquick-text-validators
25
26
\snippet qml/texthandling.qml int validator
27
The validator types bind to \c {TextInput}'s \c validator property.
28
29
\snippet qml/texthandling.qml regexp validator
30
The regular expression in the snippet will only allow the inputted text to be
31
\c {fruit basket}.
32
33
Note that QML parses JavaScript regular expressions, while Qt's
34
\l {QRegularExpression} class' regular expressions are based on Perl regular expressions.
35
36
*/
qtdeclarative
src
quick
doc
src
concepts
input
textinput.qdoc
Generated on
for Qt by
1.14.0