TextArea QML Type
A styled multi-line text input area. More...
| Import Statement: | import FluentUI 1.0 |
Properties
- cursorPosition : int
- font : font
- placeholderText : string
- placeholderTextColor : color
- readOnly : bool
- selectByMouse : bool
- selectedText : string
- selectionEnd : int
- selectionStart : int
- text : string
- textDocument : TextDocument
- wrapMode : enumeration
Methods
- void copy()
- void cut()
- void insert(int cursorPosition, string text)
- void paste()
- void redo()
- void remove(int cursorPosition, int length)
- void selectAll()
- void selectLine()
- void selectWord()
- void undo()
Detailed Description
TextArea provides a multi-line text editing region with Fluent Design styling. It supports placeholder text, selection, cursor navigation, undo/redo, and clipboard operations.
Property Documentation
cursorPosition : int
The current cursor position within the text.
font : font
The font used for the text content.
placeholderText : string
The placeholder text displayed when the text area is empty.
placeholderTextColor : color
The color of the placeholder text.
readOnly : bool
Whether the text area is read-only. When true, the user cannot modify the text content.
selectByMouse : bool
Whether text can be selected using the mouse.
selectedText : string
The currently selected text.
selectionEnd : int
The character position of the end of the text selection.
selectionStart : int
The character position of the start of the text selection.
text : string
The text content of the text area.
textDocument : TextDocument
The QTextDocument associated with the text area, providing access to the underlying document model.
wrapMode : enumeration
Controls how text wraps within the text area. Common values include Text.NoWrap, Text.WordWrap, and Text.WrapAnywhere.
Method Documentation
void copy()
Copies the selected text to the clipboard.
void cut()
Cuts the selected text to the clipboard.
void insert(int cursorPosition, string text)
Inserts text at the specified cursorPosition.
void paste()
Pastes text from the clipboard at the current cursor position.
void redo()
Reapplies the last undone editing operation.
void remove(int cursorPosition, int length)
Removes length characters starting from cursorPosition.
void selectAll()
Selects all text in the text area.
void selectLine()
Selects the line at the current cursor position.
void selectWord()
Selects the word at the current cursor position.
void undo()
Reverts the last editing operation.