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

Posts: 411
Registered: ‎04-04-2012
My Device: BlackBerry Z30/Z10/Z10LE/Q10/PlayBook
Accepted Solution

QTMobility or QTLocation?

[ Edited ]

I am trying to add a little GPS functionality to my app. I have been trying to read the documentation and am getting a little confused and there are problems in compiliing my app.


An example of the confusion. In this link




It states the includes as


#include <QtLocationSubset/QGeoAddress>
#include <QtLocationSubset/QGeoCoordinate>
#include <QtLocationSubset/QGeoPlace>
#include <QtLocationSubset/QGeoPositionInfo>
#include <QtLocationSubset/QGeoPositionInfoSource>
#include <QtLocationSubset/QGeoSatelliteInfo>
#include <QtLocationSubset/QGeoSatelliteInfoSource>
#include <QtLocationSubset/QGeoSearchManager>
#include <QtLocationSubset/QGeoSearchManagerEngine>
#include <QtLocationSubset/QGeoSearchReply>
#include <QtLocationSubset/QNmeaPositionInfoSource>

and to add


LIBS += -lQtLocationSubset

 to the .PRO file. But when you go and look at the APIs, for example




tells you to add the include


#include <QtMobilitySubset/QGeoPositionInfo>

 There seems to be a mismatch in documentation. It would be nice if there was a working sample code that just got GPS latitide and longitude.


  Also, since this is being declared as QtLocationSubset, why is the namespace QtMobilitySubset?






BlackBerry Development Advisor
Posts: 15,813
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: QTMobility or QTLocation?

Looks like a typo in API reference. I'll get that fixed.  


The correct include is QtLocationSubset/… 


Take a look at https://github.com/blackberry/Cascades-Samples/tree/master/locationdiagnostics for an example.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.