tests/manual/scenegraph_lancelot/data/text/textedit_multiline_selected_first_line.qml
raw| 1 | import QtQuick 2.0 |
| 2 | |
| 3 | Item { |
| 4 | width: 320 |
| 5 | height: 480 |
| 6 | |
| 7 | TextEdit { |
| 8 | id: textEdit |
| 9 | anchors.centerIn: parent |
| 10 | font.family: "Arial" |
| 11 | font.pixelSize: 16 |
| 12 | width: 200 |
| 13 | textFormat: TextEdit.RichText |
| 14 | wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere |
| 15 | text: "Lorem<br /> ipsum dolor sit amet, consectetur adipiscing elit. In id diam vitae enim fringilla vestibulum. Pellentesque non leo justo, quis vestibulum augue" |
| 16 | |
| 17 | Component.onCompleted: { |
| 18 | textEdit.select(0, 5) |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | } |