On this page

C

TextInput QML Type

Displays an editable text paragraph. More...

Import Statement: import QtQuick
Since: Qt Quick Ultralite 2.8

Properties

Signals

Methods

Detailed Description

The TextInput type displays a single paragraph of editable plain text. Use it to accept a single paragraph as input.

Note: Languages based on Complex Unicode scripts are not supported currently.

See also Text and Qul::PlatformInterface::handleKeyEvent.

Property Documentation

activeFocusOnPress : bool

This property indicates whether a TextInput item should get focus on a touch event. It is set to true by default.


color : color

This property holds the color of the text.


font : font

This property holds the font used for displaying the text.


inputMethodHints : Qt::InputMethodHints

Hints to the input method about the expected input and how it should operate.


text : string

This property holds the text in TextInput.

See also clear().


Signal Documentation

accepted()

This signal is emitted when the Return or Enter key is pressed.

Note: The corresponding handler is onAccepted.


textEdited()

This signal is emitted whenever the text is edited. Unlike onTextChanged(), this signal is not emitted when the text is changed programmatically, for example, either changing the value of the text property or calling clear().

Note: The corresponding handler is onTextEdited.


Method Documentation

clear()

Clears the contents of the text input. Use this method instead of setting the text property to an empty string.


Available under certain Qt licenses.
Find out more.