diff options
Diffstat (limited to 'src/quick/doc/src/texthandling.qdoc')
-rw-r--r-- | src/quick/doc/src/texthandling.qdoc | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/quick/doc/src/texthandling.qdoc b/src/quick/doc/src/texthandling.qdoc new file mode 100644 index 0000000000..2628776ca3 --- /dev/null +++ b/src/quick/doc/src/texthandling.qdoc @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** GNU Free Documentation License +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms +** and conditions contained in a signed written agreement between you +** and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! +\group qtquick-text +\title Qt Quick Text Handling and Validators +\brief Text display, input, and validation + +\section1 Text Visual Types + +Qt Quick provides several types to display text onto the screen. The \l Text +type will display formatted text onto the screen, the \l TextEdit type +will place a multiline line edit onto the screen, and the \l TextInput will +place a single editable line field onto the screen. + +\generatelist{related} + +To learn more about their specific features and properties, visit their +respective documentation. + +\section1 Validating Input Text + +The \e validator types enforce the type and format of +\l TextInput objects. + +\annotatedlist qtquick-text-validator + +\snippet doc/snippets/qml/texthandling.qml int validator +The validator types bind to \c {TextInput}'s \c validator property. + +\snippet doc/snippets/qml/texthandling.qml regexp validator +The regular expression in the snippet will only allow the inputted text to be +\c {fruit basket}. + +Note that QML parses JavaScript regular expressions, while Qt's +\l {QRegExp} class' regular expressions are based on Perl regular expressions. + +*/ + +/*! +\group qtquick-text-validator +\title Qt Quick Text Validators +\brief Types that validate text input + +The \l{Qt Quick Text Handling and Validators} page has information about +validating user text input. +*/ |