summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntti Hölttä <AHoelttae@luxoft.com>2019-03-12 14:18:00 +0100
committerAntti Hölttä <AHoelttae@luxoft.com>2019-03-18 16:43:04 +0100
commit3b2cbd9016158a6511bd2f9699d095dd60c8fc66 (patch)
tree7d9e4df7299512aa54abc6f998eeb8bbd0f470d7
parent4b5670aad31bd066abfbc62354a8b91796d7183a (diff)
Add test qml-file for testing reparenting within the same window.
No testcase yet, fails for now.
-rw-r--r--tests/reparenting2.qml71
-rw-r--r--tests/tests.pro3
2 files changed, 73 insertions, 1 deletions
diff --git a/tests/reparenting2.qml b/tests/reparenting2.qml
new file mode 100644
index 0000000..2d69cd4
--- /dev/null
+++ b/tests/reparenting2.qml
@@ -0,0 +1,71 @@
+import QtQuick 2.0
+import CursorNavigation 1.0
+import QtQuick.Controls 2.5
+
+Item {
+ width: 130
+ height: 170
+
+ CNRect {
+ x: 10
+ y: 20
+ }
+
+ CNRect {
+ x: 10
+ y: 80
+ }
+
+
+ Rectangle {
+ id: rect0
+ x: 50
+ y: 10
+ width: 70
+ height: 40
+
+ color: "blue"
+
+ FocusScope {
+ CursorNavigation.acceptsCursor: true
+ anchors.fill: parent
+
+ CNRect {
+ x: 10
+ y: 10
+ focus: true
+ }
+
+ CNRect {
+ objectName: "movableItem"
+ id: movableItem
+ x: 40
+ y: 10
+ }
+ }
+ }
+
+ Rectangle {
+ id: rect1
+ x: 50
+ y: 70
+ width: 70
+ height: 40
+
+ color: "lightblue"
+
+ CNRect {
+ x: 10
+ y: 10
+ }
+ }
+
+ Button {
+ x: 10
+ y: 120
+
+ onClicked: {
+ movableItem.parent = rect1
+ }
+ }
+}
diff --git a/tests/tests.pro b/tests/tests.pro
index ac192f3..ed92176 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -14,4 +14,5 @@ DISTFILES += \
basics.qml \
CNRect.qml \
4WayTest.qml \
- reparenting.qml
+ reparenting.qml \
+ reparenting2.qml