0

I want to start repeating vibration on a Nokia 5800. The docs say I should be using QFeedbackHapticsEffect::setPeriod(), and I try with this code:

QFeedbackHapticsEffect *effect = new QFeedbackHapticsEffect(this);
effect->setDuration(1000);
effect->setPeriod(500);
effect->setIntensity(1);
effect->start();

However the phone I'm testing on (Nokia 5800) still vibrates only once and stops, even though I've tested that periodic vibration is supported on the phone:

qDebug() << effect->actuator()->isCapabilitySupported(QFeedbackActuator::Period);

Is there something wrong with the way I'm initializing the QFeedbackHapticsEffect? Any steps that I might have missed?

sashoalm
  • 75,001
  • 122
  • 434
  • 781
  • 1
    You can check with `QFeedbackActuator::isCapabilitySupported` if effect is supported – Lol4t0 Jun 01 '13 at 20:06
  • Thanks for the tip, `effect->actuator()->isCapabilitySupported(QFeedbackActuator::Period);` returns true. So it should be supported, it's just that I'm configuring it right. The problem is that this isn't well documented at all, and there is not much info on the Internet about Qt Mobility in general. – sashoalm Jun 02 '13 at 05:04

0 Answers0