diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-10-15 03:39:25 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-10-15 03:58:55 (GMT) |
commit | 25f5008d6bc6788e68e34f24af196f12de052567 (patch) | |
tree | cb4b4c704475eafd9bfdd31a0be6ecefd2ff3bb2 /src | |
parent | bea38f654ee042946f45e3bdb628c02225a650b9 (diff) | |
download | Qt-25f5008d6bc6788e68e34f24af196f12de052567.zip Qt-25f5008d6bc6788e68e34f24af196f12de052567.tar.gz Qt-25f5008d6bc6788e68e34f24af196f12de052567.tar.bz2 |
Add cursorRect function to QFxTextInput
similar to the cursorRect in QFxTextEdit
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); |