summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index 7dacfbb..03b2425 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -43,6 +43,7 @@
#include "qdeclarativetextedit_p_p.h"
#include "qdeclarativeevents_p_p.h"
+#include <private/qdeclarativeglobal_p.h>
#include <QTextLayout>
#include <QTextLine>
@@ -485,6 +486,7 @@ void QDeclarativeTextEdit::loadCursorDelegate()
this, SLOT(moveCursorDelegate()));
d->control->setCursorWidth(0);
dirtyCache(cursorRect());
+ QDeclarative_setParent_noEvent(d->cursor, this);
d->cursor->setParentItem(this);
d->cursor->setHeight(QFontMetrics(d->font).height());
moveCursorDelegate();
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index f57ffc1..88801a4 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -42,6 +42,7 @@
#include "qdeclarativetextinput_p.h"
#include "qdeclarativetextinput_p_p.h"
+#include <private/qdeclarativeglobal_p.h>
#include <qdeclarativeinfo.h>
#include <QValidator>
@@ -619,6 +620,7 @@ void QDeclarativeTextInput::createCursor()
return;
}
+ QDeclarative_setParent_noEvent(d->cursorItem, this);
d->cursorItem->setParentItem(this);
d->cursorItem->setX(d->control->cursorToX());
d->cursorItem->setHeight(d->control->height());