aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml')
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml
new file mode 100644
index 0000000000..1e0f71a550
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml
@@ -0,0 +1,36 @@
+import QtQuick 1.0
+import "../shared" 1.0
+
+Rectangle {
+ resources: [
+ Component { id: cursorA
+ Item { id: cPage;
+ Behavior on x { NumberAnimation { } }
+ Behavior on y { NumberAnimation { } }
+ Behavior on height { NumberAnimation { duration: 200 } }
+ Rectangle { id: cRectangle; color: "black"; y: 1; width: 1; height: parent.height-2;
+ Rectangle { id:top; color: "black"; width: 3; height: 1; x: -1; y:0}
+ Rectangle { id:bottom; color: "black"; width: 3; height: 1; x: -1; anchors.bottom: parent.bottom;}
+ }
+ SequentialAnimation on opacity { running: true; loops: Animation.Infinite;
+ NumberAnimation { to: 0; duration: 500; easing.type: "OutQuad"}
+ NumberAnimation { to: 1; duration: 500; easing.type: "InQuad"}
+ }
+ width: 1;
+ }
+ }
+ ]
+ width: 400
+ height: 200
+ color: "white"
+ TestTextEdit { id: mainText
+ text: "Hello World"
+ cursorDelegate: cursorA
+ focus: true
+ font.pixelSize: 28
+ selectionColor: "lightsteelblue"
+ selectedTextColor: "deeppink"
+ color: "forestgreen"
+ anchors.centerIn: parent
+ }
+}