We have moved to a new Sailfish OS Forum. Please start new discussions there.
5

SDK: cannot use QtPositioning and QtLocation

asked 2019-04-20 19:01:34 +0300

WurzelDerMacht gravatar image

updated 2019-04-22 21:05:29 +0300

Hi, I don't have much QML experience. I tried to play around with QtPositioning and QtLocation, and as a start I created a new project and pasted some lines from the Qt examples. But my main problem is that the program won't start:

[W] unknown:4 - file:///opt/sdk/map/usr/share/map/qml/pages/FirstPage.qml:4:1: module "QtLocation" is not installed 
      import QtLocation 5.2 

My code starts like this:

import QtQuick 2.0
import Sailfish.Silica 1.0

import QtLocation 5.2
import QtPositioning 5.2

...

I tried different version numbers instead 5.2, but always the same error. The QtPositioning and QtLocation libraries are available on my Jolla Phone, but they are version 5.2, while most other Qt5 libs are 5.6. I'm running Sailfish 3.0.2.8

How can I get QtLocation and QtPositioning to work with my app?

Thanks,

WurzelDerMacht

edit: after coderus' suggestion I added qt5-qtdeclarative-import-positioning and also qt5-qtdeclarative-import-location, but I still get the same error.

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
5

answered 2019-04-20 21:08:01 +0300

coderus gravatar image

You need to add to requires: qt5-qtdeclarative-import-positioning

edit flag offensive delete publish link more

Comments

I'm currrently trying to build PyQt on the build engine. I can do so only if I disable the modules QtSensors, QtPositioning and QtLocation.

Otherwise the build will fail when trying to include e.g. qdistancesensor.h. Do you know whether there's a package missing? Packages like qt5-qtsensors and qt5-qtlocation seem to be installed, as well as the qt5-declarative-import-sensors and -positioning

Regards, Dietmar

Dietmar ( 2019-04-22 14:28:45 +0300 )edit

@coderus: thanks, but it did not help. I added qt5-qtdeclarative-import-positioning and also qt5-qtdeclarative-import-location (and combinations of both), but I still get the error. I added this to my question.

WurzelDerMacht ( 2019-04-22 21:04:41 +0300 )edit

Random thought that you probably already have had but do you have QT += location included in your .pro file?

Allstar12345 ( 2019-04-22 22:08:48 +0300 )edit
1

You installed app by copying files (opt) You need to install app with rpm to resolve dependencies

coderus ( 2019-04-22 23:08:48 +0300 )edit
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2019-04-20 19:01:34 +0300

Seen: 602 times

Last updated: Apr 22 '19