| 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 |
textFormat: Text.RichText |
| 13 |
text: "A table: <table border=2>" |
| 14 |
+ "<tr><th>Header 1</th><th>Header 2</th></tr>" |
| 15 |
+ "<tr><td>Cell 1</td><td>Cell 2</td></tr>" |
| 16 |
+ "<tr><td>Cell 3</td><td>Cell 4</td></tr>" |
| 17 |
+ "<tr><td colspan=2>Cell 5</td></tr>" |
| 18 |
+ "<tr><td rowspan=2>Cell 6</td><td>Cell 7</tr>" |
| 19 |
+ "<tr><td>Cell 8</td></tr>" |
| 20 |
|
| 21 |
Component.onCompleted: { |
| 22 |
textEdit.select(10, 30) |
| 23 |
} |
| 24 |
} |
| 25 |
} |