From 76d4cae393305a1a87e53b88ef80a2a1a87758b7 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 9 Oct 2013 13:26:10 +0200 Subject: Doc: Clean up SensorGesture QML example Fix warnings, fix property names and strings shown in the UI. Also touch the documentation and correct a typo in the qdoc file name. Task-number: QTBUG-33877 Change-Id: Ie790708ac4d1f8d72af03b52ee361d0bf3994adc Reviewed-by: Lorn Potter --- examples/sensors/qmlsensorgestures/GestureList.qml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'examples/sensors/qmlsensorgestures/GestureList.qml') diff --git a/examples/sensors/qmlsensorgestures/GestureList.qml b/examples/sensors/qmlsensorgestures/GestureList.qml index ea79af3b..a7cf0964 100644 --- a/examples/sensors/qmlsensorgestures/GestureList.qml +++ b/examples/sensors/qmlsensorgestures/GestureList.qml @@ -68,8 +68,7 @@ Rectangle { border.width: 1 anchors.margins: 5 - property string selectedGesture: ""; - signal selectedGestureChanged(); + property string selectedGesture: "" SensorGesture { id: gesture @@ -98,15 +97,20 @@ Rectangle { //! [4] ListView { id: gestureList +//! [4] anchors.fill: gestureListRect anchors.margins: 5 +//! [5] model: gesture.availableGestures +//! [5] focus: true currentIndex: -1 delegate: gestureListDelegate clip: true +//! [6] } -//! [4] +//! [6] + Component { id: gestureListDelegate @@ -122,9 +126,8 @@ Rectangle { MouseArea { anchors.fill: parent onClicked: { - gestureList.currentIndex = index; - selectedGesture = model.modelData; - selectedGestureChanged(); + gestureList.currentIndex = index + selectedGesture = model.modelData } } } -- cgit v1.2.3