diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-11-09 03:44:47 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-11-09 03:44:47 (GMT) |
commit | 604bcebbb3b37f5958b97c5178e4d2cb7cdef675 (patch) | |
tree | 62df439ee3a404672655136cef2d6c2f6a10f490 /src/declarative/graphicsitems | |
parent | e0cb271b01d18fb178b2c17969c0bf0bff880aed (diff) | |
download | Qt-604bcebbb3b37f5958b97c5178e4d2cb7cdef675.zip Qt-604bcebbb3b37f5958b97c5178e4d2cb7cdef675.tar.gz Qt-604bcebbb3b37f5958b97c5178e4d2cb7cdef675.tar.bz2 |
Improve Doc
Task-number: QTBUG-5488
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicstextinput.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp index e2b1725..cd7377e 100644 --- a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp @@ -252,10 +252,29 @@ void QmlGraphicsTextInput::setMaxLength(int ml) /*! \qmlproperty bool TextInput::cursorVisible - If true the text edit shows a cursor. + Set to true when the TextInput shows a cursor. - This property is set and unset when the line edit gets focus, but it can also - be set directly (useful, for example, if a KeyProxy might forward keys to it). + This property is set and unset when the TextInput gets focus, so that other + properties can be bound to whether the cursor is currently showing. As it + gets set and unset automatically, when you set the value yourself you must + keep in mind that your value may be overwritten. + + It can be set directly in script, for example if a KeyProxy might + forward keys to it and you desire it to look active when this happens + (but without actually giving it the focus). + + It should not be set directly on the element, like in the below QML, + as the specified value will be overridden an lost on focus changes. + + \code + TextInput { + text: "Text" + cursorVisible: false + } + \endcode + + In the above snippet the cursor will still become visible when the + TextInput gains focus. */ bool QmlGraphicsTextInput::isCursorVisible() const { |