I am using Qt 5.4 on Mac and my target platform is IOS. I have a task to add geolocation to my app and I want to use PositioningSource
component.
I added import QtPositioning 5.2
to my QML file and QT += positioning
to my .pro
file and successfully recompiled it. Anyhow I had an error from a header, when the application run.
Have you any ideas on how I can solve this issue? I saw in qmldir file the string plugin declarative_positioning
. There are files libdeclarative_positioning.a
, libdeclarative_positioning.prl
in directory ~/Qt5.4.0/5.4/ios/qml/QtPositioning
.
The same happens when I add import QtLocation 5.2
to my QML, but error message is:
module "QtLocation" plugin "declarative_location" not found
The other standard modules, e.g. QtQuick
, QtQuick.Controls
, imported in the same QML file work fine.
A little example of my qml code:
import QtQuick 2.3import QtQuick.Controls 1.2import QtQuick.Controls.Styles 1.2import QtPositioning 5.2 // an error when this string added: "module "QtPositioning" plugin "declarative_positioning" not found"//import QtLocation 5.2Rectangle { id: rect PositionSource { id: src } Component.onCompleted : console.log(position.coordinate.longitude, "", src.position.coordinate.latitude)}
Think, that's ok whith the code and problem is in qt some files or maybe ways. That is 5.4 version, installed from automatic dmg...
Now, I tried Flickr example which using QtPositionnig and it's working fine, but my program still not...