QtMobility Reference Documentation

Haptics Player

Files:

Overview

This example shows how to use various haptic effects in an application via the QtMobility Feedback API.

It provides an example of how to use the QtMobility libraries to:

  • play "system theme" haptic effects corresponding to certain predefined events
  • play a dynamic custom effect, single or repeating
  • play a custom effect which is stored in a file

Use Case

This example is more feature complete than the Haptic Square example, but is intended more as a way to test the haptics provider plugins which are available on a system, than as an example for application developers.

It is useful for people who wish to learn how to use the API to create and play custom effects dynamically, or to allow users of an application to select which haptic effect to play when a particular event occurs. It is also useful to test how effects are implemented on specific devices.

It is a more complex example than the Haptic Square example, so it is suggested that developers look at that example first.

Interface

The application is designed to work on desktop and mobile platforms with minimal differences in code between the platforms. The interface consists of three tabs which allow the user to select and play different custom, system theme, and file effects, respectively. The custom effect tab also allows the user to modify the custom effect dynamically, and see the effect of attack and fade, intensity and duration, and periodicity, on the user experience.

Known Issues

The example will not work correctly on platforms which do not have a QFeedbackHapticInterface (haptic effect provider) plugin loaded. On such platforms, the example will do nothing.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.