The TextArea item displays multiple lines of editable formatted text More...
This element was introduced in qt-components 4.7.
The TextArea item displays multiple lines of editable formatted text.
TextArea { anchors {left: parent.left; right: parent.right;} text: "This is a\nmultiline\ntext area" height: Math.max (200, implicitHeight) }
cursorPosition : int |
The position of the cursor in the TextArea.
enableSoftwareInputPanel : bool |
Allows you to disable the default software input panel. Enabled by default.
horizontalAlignment : enumeration |
verticalAlignment : enumeration |
Sets the horizontal and vertical alignment of the text within the width and height of the TextEdit item. By default, the text is top-left aligned. Valid values for horizontalAlignment are:
Valid values for verticalAlignment are:
inputMethodHints : Qt::InputMethodHints |
Sets the current input method hints.
placeholderText : string |
Text that appear if there is no focus and no content on the component.
platformSipAttributes : Item |
By default all attributes are disabled.
Use this property to set software input panel attributes.
This property should be set to an instance of SipAttributes, which are be used for example to highlight or disable the action key.
platformStyle : Item |
Element holding the platform specific styling.
platformWesternNumericInputEnforced : bool |
In some rare cases it is required to have a western numeric input panel even when the default input method is set to a language that uses non-western digits (like arabic). This may be the case when the input area expects, for example, credit card numbers.
The default is false.
readOnly : bool |
Property default is false.
Sets whether the user can interact with the TextEdit item. If this property is set to true the user cannot edit the text.
selectedText : string |
This read-only property provides the text currently selected in the text edit.
selectionEnd : int |
The cursor position after the last character in the current selection.
selectionStart : int |
The cursor position before the first character in the current selection.
text : string |
The text to display. If the text format is AutoText the text edit will automatically determine whether the text should be treated as rich text.
textFormat : enumeration |
The way the text property are displayed. TextEdit.AutoText TextEdit.PlainText TextEdit.RichText TextEdit.StyledText
wrapMode : enumeration |
The default is TextEdit.NoWrap. If you set a width, consider using TextEdit.Wrap.
Set this property to wrap the text to the width of the TextArea item. The text wraps only if an explicit width has been set.
Closes a software input panel like a virtual keyboard shown on the screen, useful for customizing when you want the input keyboard to be shown and hidden in your application.
Forces active focus on the item. This method sets focus on the item and makes sure that all the focus scopes higher in the object hierarchy are also given focus.
Opens software input panels like virtual keyboards for typing, useful for customizing when you want the input keyboard to be shown and hidden in your application.
Returns the text position closest to pixel position (x, y).
Position 0 is before the first character, position 1 is after the first character but before the second, and so on until position text.length, which is after all characters.
Returns the rectangle at the given position in the text. The x, y, and height properties correspond to the cursor that would describe that position.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.