March 8, 2012

Vetryaspa Vetryaspa
Lab Rat
87 posts

[SOLVED]QFeedbackHapticsEffect error: No such file or directory

 

hi all,

i have to try to activate the vibration at button click but qhen i compile compare the error: “ error: QFeedbackHapticsEffect: No such file or directory” in the simulator:

  1. void FormDettaglioRistorante::backButton(){
  2.     QFeedbackHapticsEffect rumble;
  3.     rumble.setIntensity(1.0);
  4.     rumble.setDuration(100);
  5.     rumble.start();
  6. }

this is the metod to activate the vibration

and in the device I have another problem like this: “error: Recipe linkandpostlink failed with exit code 1.”

how i can solve?

6 replies

March 8, 2012

koahnig koahnig
Mad Scientist
2101 posts

Are you sure that QFeedbackHapticsEffect is a Qt routine?

March 8, 2012

Vetryaspa Vetryaspa
Lab Rat
87 posts

I never have work with hapatic effect what do you mean with Qt routine?

Then i have another quest to activete the Hapatic effect, the button that activate this it must be an HapaticButton?

March 8, 2012

Vetryaspa Vetryaspa
Lab Rat
87 posts

I have solved the problem of dependency writing in the .pro file the follow line: “@LIBS += -lQtFeedback@”

but then the device not Vibrate. why????? i’m sure that the method il call because i have insert a QDebug ant it was call.

  1. void FormDettaglioRistorante::backButton(){
  2.     qDebug()<<"backButton()";
  3.     QFeedbackHapticsEffect rumble;
  4.     rumble.setIntensity(1.0);
  5.     rumble.setDuration(100);
  6.     rumble.start();
  7. }

March 8, 2012

koahnig koahnig
Mad Scientist
2101 posts

Vetryaspa wrote:
I never have work with hapatic effect what do you mean with Qt routine?

Then i have another quest to activete the Hapatic effect, the button that activate this it must be an HapaticButton?

I was just wondering, it did not show up in the web docs. But you have found the required change in .pro.

March 8, 2012

Vetryaspa Vetryaspa
Lab Rat
87 posts

koahnig wrote:

I was just wondering, it did not show up in the web docs. But you have found the required change in .pro.

I not have fount the requied change in the DOC but in an example in the Qt creator sample code.

but the question now is why the event not start??? the device not vibrate!!

March 8, 2012

Vetryaspa Vetryaspa
Lab Rat
87 posts

I have found the way:

  1.     QFeedbackHapticsEffect *rumble = new QFeedbackHapticsEffect(this);
  2.     rumble->setIntensity(1.0);
  3.     rumble->setDuration(100);
  4.     rumble->start();

i have set the pointer ant i have pass the parent. Now run!!

 
  ‹‹ sorting a .srt file for vlc player      TSLIB segfault on exit?? ››

You must log in to post a reply. Not a member yet? Register here!