diff options
Diffstat (limited to 'doc/src/declarative/qmltexthandling.qdoc')
-rw-r--r-- | doc/src/declarative/qmltexthandling.qdoc | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/doc/src/declarative/qmltexthandling.qdoc b/doc/src/declarative/qmltexthandling.qdoc index c5a6bc9..7906193 100644 --- a/doc/src/declarative/qmltexthandling.qdoc +++ b/doc/src/declarative/qmltexthandling.qdoc @@ -35,8 +35,6 @@ \tableofcontents -\section1 Introduction - \section1 Text Elements \list @@ -52,4 +50,27 @@ \o \l{RegExpValidator} \endlist +\section1 Displaying Text in QML +QML provides several elements to display text onto the screen. The \l Text +element will display formatted text onto the screen, the \l TextEdit element +will place a multiline line edit onto the screen, and the \l TextInput will +place a single editable line field onto the screen. + +To learn more about their specific features and properties, visit their +respective element documentation. + +\section1 Validating Input Text +The \l {Validators}{validator} elements enforce the type and format of +\l TextInput objects. + +\snippet doc/src/snippets/declarative/texthandling.qml int validator +The validator elements bind to \c {TextInput}'s \c validator property. + +\snippet doc/src/snippets/declarative/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. + */ |