| ID | ... | Creation date | June 20, 2009 |
| Platform | S60 3rd Edition, FP1, FP2 S60 5th Edition | Tested on devices | Nokia 5800 XpressMusic |
| Category | Qt for Symbian | Subcategory |
| Keywords (APIs, classes, methods, functions): XQVibra |
This code snippets shows how to vibrate mobile device in Qt. The XQVibra class provides method start() which vibrate the device.
This snippet can be self-signed. As it does not use any API which require developer/certified signing.
#include <XQVibra>
symbian:LIBS += -lhwrmvibraclient
// Create the vibra object
XQVibra* vibra = new XQVibra(this);
// Set the vibration intensity to 50%. Possible values are between -100% and 100%.
vibra->setIntensity(50);
//vibrate for 5 second
vibra->start(5000);