summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativetextinput.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-11-10 23:00:14 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-11-10 23:00:14 (GMT)
commitad925d41019d5e5c47143ab91f775f970995ad0d (patch)
treead05cea02ddf9c87b832fc7111bb1b09f5203408 /src/declarative/graphicsitems/qdeclarativetextinput.cpp
parentb7d91c0d798bc10dd4f8a750723285076fb96935 (diff)
parent38e1ed3b51d6aad46912eb548490d038e58203d9 (diff)
downloadQt-ad925d41019d5e5c47143ab91f775f970995ad0d.zip
Qt-ad925d41019d5e5c47143ab91f775f970995ad0d.tar.gz
Qt-ad925d41019d5e5c47143ab91f775f970995ad0d.tar.bz2
Merge branch '4.7-upstream' into 4.7-water
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextinput.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 2348478..0deacf8 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -460,10 +460,9 @@ QRect QDeclarativeTextInput::cursorRectangle() const
text edit.
Note that if selectionStart == selectionEnd then there is no current
- selection. If you attempt to set selectionStart to a value outside of
- the current text, selectionStart will not be changed.
+ selection.
- \sa selectionEnd, cursorPosition, selectedText
+ \sa selectionEnd, cursorPosition, selectedText, select()
*/
int QDeclarativeTextInput::selectionStart() const
{
@@ -479,10 +478,9 @@ int QDeclarativeTextInput::selectionStart() const
text edit.
Note that if selectionStart == selectionEnd then there is no current
- selection. If you attempt to set selectionEnd to a value outside of
- the current text, selectionEnd will not be changed.
+ selection.
- \sa selectionStart, cursorPosition, selectedText
+ \sa selectionStart, cursorPosition, selectedText, select()
*/
int QDeclarativeTextInput::selectionEnd() const
{
@@ -490,6 +488,19 @@ int QDeclarativeTextInput::selectionEnd() const
return d->lastSelectionEnd;
}
+/*!
+ \qmlmethod void TextInput::select(int start, int end)
+
+ Causes the text from \a start to \a end to be selected.
+
+ If either start or end is out of range, the selection is not changed.
+
+ After calling this, selectionStart will become the lesser
+ and selectionEnd will become the greater (regardless of the order passed
+ to this method).
+
+ \sa selectionStart, selectionEnd
+*/
void QDeclarativeTextInput::select(int start, int end)
{
Q_D(QDeclarativeTextInput);