summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-05-26 05:15:45 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-05-26 05:15:45 (GMT)
commite9a25332df933227c6b71a1654260d8421f56415 (patch)
treed0537f2e39fed1261bba0a14a43755cf2e5dbf1a /doc
parent291dce4ceba88a6cada0415524e3466621ac1612 (diff)
downloadQt-e9a25332df933227c6b71a1654260d8421f56415.zip
Qt-e9a25332df933227c6b71a1654260d8421f56415.tar.gz
Qt-e9a25332df933227c6b71a1654260d8421f56415.tar.bz2
Fix TextEdit clipping when not wrapped. Rename most-useful-wrap-mode to "Wrap".
Diffstat (limited to 'doc')
-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)
}
}