aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-06-20 10:13:29 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-20 07:45:20 +0200
commitfa5da73d3f72921a1714723d2b9794c1c29882b8 (patch)
tree0f3d0b91f86736494856421f1b3d1bda2306edf1
parentdd2eea694eac481f2381a6b3c953eb41a9ebd4c5 (diff)
Give the example Loader in the shared launcher focus.
Allows an example to receive focus the same as if it were the root item in a scene. Change-Id: Iedd31236db50ba985aebe3bd82a5af8803dc0f17 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
-rw-r--r--examples/shared/LauncherList.qml13
1 files changed, 9 insertions, 4 deletions
diff --git a/examples/shared/LauncherList.qml b/examples/shared/LauncherList.qml
index 492290dc3e..85e39a56f1 100644
--- a/examples/shared/LauncherList.qml
+++ b/examples/shared/LauncherList.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-ListView {
+Item {
//model is a list of {"name":"somename", "url":"file:///some/url/mainfile.qml"}
//function used to add to model A) to enforce scheme B) to allow Qt.resolveUrl in url assignments
function addExample(name, desc, url)
@@ -51,9 +51,13 @@ ListView {
ei.visible = false;
}
- clip: true
- delegate: SimpleLauncherDelegate{exampleItem: ei}
- model: ListModel {id:myModel}
+ ListView {
+ clip: true
+ delegate: SimpleLauncherDelegate{exampleItem: ei}
+ model: ListModel {id:myModel}
+ anchors.fill: parent
+ }
+
Item {
id: ei
visible: false
@@ -73,6 +77,7 @@ ListView {
//Eats mouse events
}
Loader{
+ focus: true
source: ei.exampleUrl
anchors.fill: parent
}