[SailfishDevel] undefined symbols
. .
droll at hotmail.com
Fri Feb 14 22:56:57 UTC 2014
Anyone?
From: droll at hotmail.com
To: devel at lists.sailfishos.org
Date: Fri, 14 Feb 2014 10:49:14 +0000
Subject: Re: [SailfishDevel] undefined symbols
#include <QtFeedback/QFeedbackActuator>
#include <QtFeedback/QFeedbackHapticsEffect>
#include <QCoreApplication>
#include <QTimer>
#include <QDebug>
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
// get the actuator list
QList<QFeedbackActuator *> list = QFeedbackActuator::actuators () ;
// get the Vibra
QFeedbackActuator * vibra = 0;
QFeedbackActuator *duh;
qDebug() << duh->actuators().count();
foreach (QFeedbackActuator * a, list)
{
qDebug() << a->name();
if (a->name() == "FF_MEMLESS")
vibra = a;
}
// if vibra is not found, you device does not have it
if (vibra == 0)
{
//handle error
qDebug() << "Shit :)";
}
else
{
qDebug() << "Starting now";
// handle error
// let's change the actuator
QFeedbackHapticsEffect shake;
shake.setAttackTime(250);
shake.setFadeTime(250);
shake.setIntensity(1.0);
shake.setDuration(1000);
shake.setActuator(vibra);
shake.start();
QEventLoop loop;
QTimer::singleShot(1000, &loop, SLOT(quit()));
loop.exec();
shake.stop();
}
return 0;
}
Date: Fri, 14 Feb 2014 15:36:16 +0600
From: coderusinbox at gmail.com
To: devel at lists.sailfishos.org
Subject: Re: [SailfishDevel] undefined symbols
show code please
On 14.02.2014 15:30, . . wrote:
Well, now that I have that out of the way, I'm
hitting another road block. The phone doesn't vibrate at all.
:(
What I'm seeing in my call to
QFeedbackActuators::actuators() is a single actuator called
"FF_MEMLESS".
When I use that single actuator with
QFeedbackHapticsEffect::setActuator(), and set the rest of the
parameters like intensity, attacktime, etc, the phone does
absolutely nothing.
Does anyone have any idea how to make the phone
programmatically vibrate on Sailfish?
Thanks.
_______________________________________________
SailfishOS.org Devel mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140214/25fe18ac/attachment.html>
More information about the Devel
mailing list