summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativetextedit/data/alignments.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativetextedit/data/alignments.qml')
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/alignments.qml41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/alignments.qml b/tests/auto/declarative/qdeclarativetextedit/data/alignments.qml
new file mode 100644
index 0000000..b1f701b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/alignments.qml
@@ -0,0 +1,41 @@
+import Qt 4.7
+
+Rectangle {
+ id: top
+ width: 70; height: 70;
+
+ property alias horizontalAlignment: t.horizontalAlignment
+ property alias verticalAlignment: t.verticalAlignment
+ property alias wrapMode: t.wrapMode
+ property alias running: timer.running
+ property string txt: "Test"
+
+ Rectangle {
+ anchors.centerIn: parent
+ width: 40
+ height: 40
+ color: "green"
+
+ Text {
+ id: t
+
+ anchors.fill: parent
+ horizontalAlignment: TextEdit.AlignRight
+ verticalAlignment: TextEdit.AlignBottom
+ wrapMode: TextEdit.WordWrap
+ text: top.txt
+ }
+ Timer {
+ id: timer
+
+ interval: 1
+ running: true
+ repeat: true
+ onTriggered: {
+ top.txt = top.txt + "<br>more " + top.txt.length;
+ if (top.txt.length > 50)
+ running = false
+ }
+ }
+ }
+}