summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/texteditor.qml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/snippets/declarative/texteditor.qml')
-rw-r--r--doc/src/snippets/declarative/texteditor.qml8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/src/snippets/declarative/texteditor.qml b/doc/src/snippets/declarative/texteditor.qml
index 0bd79b5..6735c6c 100644
--- a/doc/src/snippets/declarative/texteditor.qml
+++ b/doc/src/snippets/declarative/texteditor.qml
@@ -45,7 +45,8 @@ Flickable {
id: flick
width: 300; height: 200;
- contentHeight: edit.height
+ contentWidth: edit.paintedWidth
+ contentHeight: edit.paintedHeight
clip: true
function ensureVisible(r)
@@ -62,9 +63,10 @@ Flickable {
TextEdit {
id: edit
- width: parent.width
+ width: flick.width
+ height: flick.height
focus: true
- wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
+ wrapMode: TextEdit.Wrap
onCursorRectangleChanged: flick.ensureVisible(cursorRectangle)
}
}