summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire.ecortex@kdab.com>2014-11-13 08:01:08 +0100
committerSean Harmer <sean.harmer@kdab.com>2014-11-14 20:30:06 +0100
commitc0f6de705bce3e2873d37a8fafaa4661b0ac2ebf (patch)
treeaf6fc9f45eebbaeaeaa4ad0468f50a4cab87086f
parentf3e96f896aa8b46fc7a2cf830a9563e5d8306480 (diff)
keyboardinput-qml example updated
Assign default focus property to center sphere and correction on scale-focus binding. Change-Id: Ida77a16b68a6935053aa0cc34ab9dbfb03b7893d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--examples/keyboardinput-qml/main.qml6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/keyboardinput-qml/main.qml b/examples/keyboardinput-qml/main.qml
index 8c83f3fa1..f0b1665f0 100644
--- a/examples/keyboardinput-qml/main.qml
+++ b/examples/keyboardinput-qml/main.qml
@@ -105,11 +105,12 @@ Entity {
dx: -5
}
Scale {
- scale: sphere2.input.focus ? 2 : 1
+ scale: sphere1.input.focus ? 2 : 1
}
}
property KeyboardInput input: KeyboardInput {
controller: keyboardController
+ focus: false
}
components: [material, transform, sphereMesh, input]
@@ -130,6 +131,7 @@ Entity {
}
property KeyboardInput input: KeyboardInput {
controller: keyboardController
+ focus: true
}
components: [material, transform, sphereMesh, input]
@@ -145,7 +147,7 @@ Entity {
dx: 5
}
Scale {
- scale: sphere2.input.focus ? 2 : 1
+ scale: sphere3.input.focus ? 2 : 1
}
}
property KeyboardInput input: KeyboardInput {