From a4b0ac2af03f4a78469a3dc0e04f785cde4ab381 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Tue, 14 Feb 2012 12:55:38 +1000 Subject: Fix access to context properties within TextEdit.cursorDelegate Don't create the cursorDelegate instance before componentComplete as the context may not be fully populated prior to that. Task-number: QTBUG-21780 Change-Id: I6ca8a24989bc28e5c5ca06d61a85e32ff630ce7c Reviewed-by: Martin Jones --- .../qtquick2/qquicktextedit/data/cursorTestExternal.qml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/auto/qtquick2/qquicktextedit/data/cursorTestExternal.qml (limited to 'tests/auto/qtquick2/qquicktextedit/data/cursorTestExternal.qml') diff --git a/tests/auto/qtquick2/qquicktextedit/data/cursorTestExternal.qml b/tests/auto/qtquick2/qquicktextedit/data/cursorTestExternal.qml new file mode 100644 index 0000000000..7e916ec818 --- /dev/null +++ b/tests/auto/qtquick2/qquicktextedit/data/cursorTestExternal.qml @@ -0,0 +1,15 @@ +import QtQuick 2.0 + +Rectangle { width: 300; height: 300; color: "white" + property string contextualProperty: "Hello" + TextEdit { + text: "Hello world!" + id: textEditObject; + objectName: "textEditObject" + cursorDelegate: Cursor { + id:cursorInstance; + objectName: "cursorInstance"; + localProperty: contextualProperty; + } + } +} -- cgit v1.2.3