diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-11-10 23:00:14 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-11-10 23:00:14 (GMT) |
commit | ad925d41019d5e5c47143ab91f775f970995ad0d (patch) | |
tree | ad05cea02ddf9c87b832fc7111bb1b09f5203408 /src/declarative/graphicsitems/qdeclarativetextinput.cpp | |
parent | b7d91c0d798bc10dd4f8a750723285076fb96935 (diff) | |
parent | 38e1ed3b51d6aad46912eb548490d038e58203d9 (diff) | |
download | Qt-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.cpp | 23 |
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); |