63872216707311cb0c498db1333bba09deea6c5f
[profile/ivi/qtdeclarative.git] / src / quick / doc / src / concepts / input-text.qdoc
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
5 **
6 ** This file is part of the documentation of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:FDL$
9 ** GNU Free Documentation License
10 ** Alternatively, this file may be used under the terms of the GNU Free
11 ** Documentation License version 1.3 as published by the Free Software
12 ** Foundation and appearing in the file included in the packaging of
13 ** this file.
14 **
15 ** Other Usage
16 ** Alternatively, this file may be used in accordance with the terms
17 ** and conditions contained in a signed written agreement between you
18 ** and Nokia.
19 **
20 **
21 **
22 **
23 **
24 ** $QT_END_LICENSE$
25 **
26 ****************************************************************************/
27
28 /*!
29 \group qtquick-text
30 \page qtquick-concepts-input-text.html
31 \title Qt Quick Text Input Handling and Validators
32 \brief Text input and validation
33
34 \section1 Text Visual Types
35
36 Qt Quick provides several types to display text onto the screen. The \l Text
37 type will display formatted text onto the screen, the \l TextEdit type
38 will place a multiline line edit onto the screen, and the \l TextInput will
39 place a single editable line field onto the screen.
40
41 \generatelist{related}
42
43 To learn more about their specific features and properties, visit their
44 respective documentation.
45
46 \section1 Validating Input Text
47
48 The \e validator types enforce the type and format of
49 \l TextInput objects.
50
51 \annotatedlist qtquick-text-validator
52
53 \snippet doc/snippets/qml/texthandling.qml int validator
54 The validator types bind to \c {TextInput}'s \c validator property.
55
56 \snippet doc/snippets/qml/texthandling.qml regexp validator
57 The regular expression in the snippet will only allow the inputted text to be
58 \c {fruit basket}.
59
60 Note that QML parses JavaScript regular expressions, while Qt's
61 \l {QRegExp} class' regular expressions are based on Perl regular expressions.
62
63 */
64
65 /*!
66 \group qtquick-text-validator
67 \title Qt Quick Text Validators
68 \brief Types that validate text input
69
70 The \l{qtquick-concepts-input-text.html}
71 {Qt Quick Text Input Handling and Validators} page has information about
72 validating user text input.
73 */