diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-04-09 05:58:35 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-04-09 05:58:35 (GMT) |
commit | 4a40a67827c8f259876e906a5a9afd2159ca9028 (patch) | |
tree | 06f82400d11677979a425d6392dd3241769737dd /tests/auto | |
parent | 475abec27948923ae6de74db53b137f19c661601 (diff) | |
download | Qt-4a40a67827c8f259876e906a5a9afd2159ca9028.zip Qt-4a40a67827c8f259876e906a5a9afd2159ca9028.tar.gz Qt-4a40a67827c8f259876e906a5a9afd2159ca9028.tar.bz2 |
Enable other wrapping modes.
WrapAnywhere - Text can be wrapped at any point on a line, even if it
occurs in the middle of a word.
WrapAtWordBoundaryOrAnywhere - If possible, wrapping occurs at a word
boundary; otherwise it will occur at the appropriate point on the line,
even in the middle of a word.
Diffstat (limited to 'tests/auto')
3 files changed, 28 insertions, 3 deletions
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml index c44088b..90b5411 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml @@ -81,5 +81,11 @@ Rectangle { Text { text: s.text; elide: Text.ElideRight; width: 200; wrapMode: Text.WordWrap } + Text { + text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere + } + Text { + text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAtWordBoundaryOrAnywhere + } } } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml index b5d05da..0dba47c 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml @@ -81,5 +81,11 @@ Rectangle { Text { text: s.text; elide: Text.ElideRight; width: 200; wrapMode: Text.WordWrap } + Text { + text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere + } + Text { + text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAtWordBoundaryOrAnywhere + } } } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml index af69994..b2a0754 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml @@ -5,17 +5,30 @@ Item { width: 200 TextEdit { width: 200 - height: 200 + height: 100 wrapMode: TextEdit.WordWrap focus: true } //With QTBUG-6273 only the bottom one would be wrapped TextEdit { width: 200 - height: 200 + height: 100 wrapMode: TextEdit.WordWrap text: "This is a test that text edit wraps correctly." + y:100 + } + TextEdit { + width: 150 + height: 100 + wrapMode: TextEdit.WrapAnywhere + text: "This is a test that text edit wraps correctly. thisisaverylongstringwithnospaces" y:200 } - + TextEdit { + width: 150 + height: 100 + wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere + text: "This is a test that text edit wraps correctly. thisisaverylongstringwithnospaces" + y:300 + } } |