Qt Quick Components

TextArea

TextArea is a multiline editor that resizes vertically to fit all input characters. More...

  • List of all members, including inherited members
  • Properties

    Methods

    Detailed Description

    Property Documentation

    cursorPosition : int

    The position of the cursor in the TextArea.

    See also TextEdit::cursorPosition.


    font : font

    Font information for the text in the text field.

    See also TextEdit::font.


    horizontalAlignment : int

    verticalAlignment : int

    Sets the horizontal and vertical alignment of the text within the TextArea item's width and height. By default, the text is top-left aligned.

    For details of the options, see: TextEdit::horizontalAlignment


    readOnly : bool

    If this is true, the text field can only be viewed, it cannot be edited.

    If this is false, the text field can be edited.

    See also TextEdit::readOnly.


    selectedText : string

    This read-only property provides the text that is currently selected in the text field.

    See also TextEdit::selectedText.


    selectionEnd : int

    The cursor position after the last character in the current selection.

    See also selectionstart, selectedText, cursorPosition, and TextEdit::selectionEnd.


    selectionStart : int

    The cursor position before the first character in the current selection.

    See also selectionEnd, selectedText, cursorPosition, and TextEdit::selectionStart.


    text : string

    The text that has been entered into the text field.


    textFormat : int

    This determines if the text is displayed as rich text or plain text. By default it will and determine if the text is rich text or plain text and display it appropriately.

    See TextEdit::textFormat for the enumeration details.


    wrapMode : int

    This determines if text in the TextArea is wrapped or not.

    See TextEdit::wrapMode for details of the different modes.


    Method Documentation

    TextArea::copy ()

    Copies the currently selected text to the system clipboard.

    See also paste, cut, and TextEdit::copy().


    TextArea::cut ()

    Moves the currently selected text to the system clipboard.

    See also TextEdit::cut().


    TextArea::paste ()

    Replaces the currently selected text by the contents of the system clipboard.

    See also copy, cut, and TextEdit::paste().


    TextArea::positionAt ( x, y )

    Returns the character position at x pixels from the left edge of the text field and y pixels from the top edge of the text field.

    See also TextEdit::positionAt().


    TextArea::positionToRectangle ( pos )

    Returns the rectangle that the cursor would occupy if it was placed at pos character position.

    This is similar to setting the cursorPosition, and then querying the cursor rectangle, but the cursorPosition is not changed.

    See also cursorPosition and TextEdit::positionToRectangle().


    TextArea::select ( start, end )

    Causes the text from start to end to be selected.

    See also selectionStart, selectionEnd, and TextEdit::select().


    TextArea::selectAll ()

    Causes all text in the text field to be selected.

    See also TextEdit::selectAll().


    TextArea::selectWord ()

    Causes the word closest to the current cursor position to be selected.

    See also TextEdit::selectWord().