Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Gerry_BB
Posts: 38
Registered: ‎12-06-2011
My Device: Playbook 64GB, Curve 9360, BB Z10 LE
My Carrier: Koodo
Accepted Solution

Problem including <QtSensors/QAccelerometerFilter>

Hi,

 

I am trying to build a small application that makes use of all the sensors available on the BB10 platform. (just to learn how they work, so I can use them as required in a school project). However, as soon as I add this to my code :

#include <QtSensors/QAccelerometerFilter>

I get a build error : 

Description Resource Path Location Type
fatal error: qmobilityglobal.h: No such file or directory ProblemReport line 45, external location: c:\bbndk\target_10_0_9_386\qnx6\usr\include\qt4\QtSensors\qsensor.h C/C++ Problem

 

I have tried other includes but they all give build errors - either like this, or that the include cannot be resolved. This particular include is also used in this example : http://blackberry.github.com/Cascades-Samples/sensors-accelgame-src-accelerationsensor-hpp.html.

 

Any tips or suggestions to solve this problem?

 

Thanks,

 

Gerry

Please use plain text.
Developer
Gerry_BB
Posts: 38
Registered: ‎12-06-2011
My Device: Playbook 64GB, Curve 9360, BB Z10 LE
My Carrier: Koodo

Re: Problem including <QtSensors/QAccelerometerFilter>

I found the solution after doing some more reading : https://developer.blackberry.com/cascades/documentation/device_comm/sensors/.

 

It is important to add :

CONFIG += mobility
MOBILITY += sensors
to the .pro file. This will solve the problem!
Please use plain text.