[Interest] Qt positioning

Kalinowski Maurice Maurice.Kalinowski at theqtcompany.com
Wed Aug 12 09:28:02 CEST 2015


Did you check with the examples provided in the module? If those do not work for you either, then it's time to open a bugreport soon, so that it might get fixed for 5.5.1 then.

BR,
Maurice

> -----Ursprüngliche Nachricht-----
> Von: interest-bounces+maurice.kalinowski=theqtcompany.com at qt-
> project.org [mailto:interest-
> bounces+maurice.kalinowski=theqtcompany.com at qt-project.org] Im
> Auftrag von Jason H
> Gesendet: Tuesday, August 11, 2015 4:48 PM
> An: Federico Buti <bacarozzo at gmail.com>
> Cc: interest at qt-project.org
> Betreff: Re: [Interest] Qt positioning
> 
> 
> > Sent: Tuesday, August 11, 2015 at 8:24 AM
> From: "Federico Buti" <bacarozzo at gmail.com>
> To: "interest at qt-project.org" <interest at qt-project.org>
> Subject: [Interest] Qt positioning
> 
> Hi list,
> 
> I was playing around with positioning on Android and I'm not sure if I'm using
> it properly. I would like to update the position of the cellphone/app ASA the
> user taps on a button. To achieve this result I've setup my project as follows:
> ...
> 
> ​The idea was to activate the GPS ​only when required, update the value
> (probably with a busy dialog on screen) and deactivate it. I could have used
> the update() method, I know.
> Now, if I execute the code on a device with GPS turned off, I've the error
> "PositionSource.ClosedError". Instead, on the same device with GPS turned
> on the position is never updated. The same occurs in a newly created project
> with just this code added.
> Qt version is 5.5
> What am I missing? What am I doing wrong? The default dialog for GPS
> activation (i.e. the one shown by Googlemaps for instance) is not shown
> when position acquisition is started? Thanks everyone for your time, F.
> --------
> 
> 
> I've not had any success in iOS or Android. I've got a mobile app that is
> supposed to grab a position and it never does. Here's my setup
> main.qml:
> 	PositionSource {
> 		id: positionSource
> 	}
> 	Component.onCompleted: {
> 		positionSource.update();
> 	}
> later (~90s)... on an event handler:
> 				if (positionSource.valid)
> 					root.location = {lat:
> positionSource.position.coordinate.latitude, lon:
> positionSource.position.coordinate.longitude};
> 				else
> 					root.location = {lat: null, lon: null};
> 
> It never goes valid. One thing to note, is in my work environment, my GPS is
> usually on, and has a fix, so it should already be valid.
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest


More information about the Interest mailing list