summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-10-15 03:39:25 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-10-15 03:58:55 (GMT)
commit25f5008d6bc6788e68e34f24af196f12de052567 (patch)
treecb4b4c704475eafd9bfdd31a0be6ecefd2ff3bb2 /src
parentbea38f654ee042946f45e3bdb628c02225a650b9 (diff)
downloadQt-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.cpp12
-rw-r--r--src/declarative/fx/qfxtextinput.h2
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);