SensorGestureProvides notifications when sensor-based gestures are detected. More... Inherits QtObject This type was introduced in QtSensors 5.0. Properties
Signals
Detailed DescriptionThis element provides notification when sensor gestures are triggered. This element is part of the QtSensors 5 module. The following QML code creates a "shake" and "template" SensorGesture QML element, and displays the detected gesture in a text element. QtSensors.shake gesture is available with the Qt Sensors API, but the QtSensors.SecondCounter sensor gesture is provided as example code for the SensorGesture QML Element example Item { SensorGesture { id: sensorGesture enabled: false gestures : ["QtSensors.shake", "QtSensors.SecondCounter"] onDetected:{ detectedText.text = gesture } } Text { id: detectedText x:5 y:160 text: "" } } Qt Sensor Gestures contains a list of currently supported sensor gestures and their descriptions. Property DocumentationThis property can be used to determine all available gestures on the system. This property can be used to activate or deactivate the sensor gesture. Default value is false; See also QtSensors5::SensorGesture::detected and detected. Set this property to a list of the gestures that the application is interested in detecting. This property cannot be changed while the element is enabled. The properties validGestures and invalidGestures will be set as appropriate immediately. To determine all available getures on the system please use the availableGestures property. See also QtSensorGestures Plugins. This property holds the requested gestures that were not found on the system. This property holds the requested gestures that were found on the system. Signal DocumentationThis signal is emitted whenever a gesture is detected. The gesture parameter contains the gesture that was detected. |