diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/fx/qfxtextinput.cpp | 12 | ||||
-rw-r--r-- | src/declarative/fx/qfxtextinput.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxtextinput.cpp b/src/declarative/fx/qfxtextinput.cpp index f5bf911..c694133 100644 --- a/src/declarative/fx/qfxtextinput.cpp +++ b/src/declarative/fx/qfxtextinput.cpp @@ -289,6 +289,18 @@ void QFxTextInput::setCursorPosition(int cp) } /*! + \internal + + Returns a Rect which encompasses the cursor, but which may be larger than is + required. Ignores custom cursor delegates. +*/ +QRect QFxTextInput::cursorRect() const +{ + Q_D(const QFxTextInput); + return d->control->cursorRect(); +} + +/*! \qmlproperty int TextInput::selectionStart The cursor position before the first character in the current selection. diff --git a/src/declarative/fx/qfxtextinput.h b/src/declarative/fx/qfxtextinput.h index d5d0450..2540d41 100644 --- a/src/declarative/fx/qfxtextinput.h +++ b/src/declarative/fx/qfxtextinput.h @@ -131,6 +131,8 @@ public: int cursorPosition() const; void setCursorPosition(int cp); + QRect cursorRect() const; + int selectionStart() const; void setSelectionStart(int); |