[SailfishDevel] Fwd: Re: How to get GPS Location in QML

christopher.lamb at thurweb.ch christopher.lamb at thurweb.ch
Mon Oct 28 12:39:45 UTC 2013

Hi  Bolek

I must have been still half asleep this morning, and did not properly  
read the code I sent you....

It looks like PositionSource has been moved from Location to  
Positioning (see the example here:  

So the import we need is Import QtPositioning 5.0


----- Weitergeleitete Nachricht von christopher.lamb at thurweb.ch -----
      Datum: Mon, 28 Oct 2013 09:29:46 +0100
        Von: christopher.lamb at thurweb.ch
    Betreff: Re: [SailfishDevel] How to get GPS Location in QML
         An: tw_bolek <tw_bolek at op.pl>
         Cc: devel at lists.sailfishos.org

Hi Bolek

that's of interest to me as well.

I am at work, so I shouldn't spend too much time on this ...

But I had a quick peak at the sources


It looks to me that PositionSource is a Location 5.2 type. (But the  
Location bundled with Sailfish is not 5.2 yet)

It that is the case then we have three options

1) wait for Qt 5.2
2) download and compile the Location 5.2 sources, and use those
3) write your own plugin to expose PositionSource to qml. I did this  
on Harmattan 4.7.4 for the SatelitteSourceInfo

I hope to make time this evening to look more closely into this.



Zitat von tw_bolek <tw_bolek at op.pl>:

> Hello list,
> I am porting my Harmattan QML applications to Sailfish OS.  I simply  
> need to get GPS Location.  In Qt4.8 / QtQuick1.1 it only took  
> importing QtMobility.location and then using PositionSource. 
> In the latest SailfishOS SDK I tried importing QtLocation 5.0 but it  
> is not found.  PositionSource is an unknown element.
> So.... how do I do in Sailfish OS (in QML only) as simple thing as  
> getting location coordinates from GPS?
> I'll be very grateful if you could guide me, in a simple and  
> straightforward way....  Thank you!
> Bolek

SailfishOS.org Devel mailing list

----- Ende der weitergeleiteten Nachricht -----

More information about the Devel mailing list