Text Handling and ValidatorsText ElementsValidatorsDisplaying Text in QMLQML provides several elements to display text onto the screen. The Text element will display formatted text onto the screen, the TextEdit element will place a multiline line edit onto the screen, and the 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. Validating Input TextThe validator elements enforce the type and format of TextInput objects. The validator elements bind to TextInput's validator property. The regular expression in the snippet will only allow the inputted text to be fruit basket. Note that QML parses JavaScript regular expressions, while Qt's QRegExp class' regular expressions are based on Perl regular expressions. |