[SOLVED]QtMobility in QML
-
I spent some time now trying to figure out the logic in utilizing QtMobility in QML code.
Issue is:- I have final SDK version installed "by default"
- once I add the line "import QtMobility.location 1.1" the app simply fails to run in QML Viewer with error "module "QtMobility.location" is not installed"
I thought the SDK is like "ready-to-go" but it seems it needs some manual setting up in order to make it QtMobility ready?
I read some stuff here: "Qt Mobility Installation Guide":http://doc.qt.nokia.com/qtmobility-1.2/installation.html
So do I really need to have all those ActionPerl etc installed on my Windows PC in order to make the module work?
User Journey is really weird in this case;(
SOLUTION:
- just add: import QtMobility.location 1.1 into the beginning of your qml
- add to pro file (you will see commented reference there):
CONFIG += mobility
MOBILITY += location - now re-build the project (q-make)
This works for Simulator only, seems like desktop emulator is not meant to be supporting Qt Mobility.
-
Hey thank for your reply.
I am currently working in Qt Quick UI project (not an app) - maybe that's the reason?I tried to do as suggested straghtforwardly changing the version to 1.1 as you mentioned above - the project fails to load with the following messages:
c:/qtsdk/symbian/sdks/symbian1qt473/mkspecs/symbian-abld/qmake.conf(8): 'option' is not a recognized test function
c:/qtsdk/symbian/sdks/symbian3qt473/mkspecs/symbian-sbsv2/qmake.conf(8): 'option' is not a recognized test function
Error while loading project file!
file:///C:/Project/TestProject1/TestProjectMain.qmlproject:3 module "QmlProject" version 1.1 is not installedError while loading project file!
file:///C:/Project/TestProject1/TestProjectMain.qmlproject:3 module "QmlProject" version 1.1 is not installedError while loading project file!
file:///C:/Project/TestProject1/TestProjectMain.qmlproject:3 module "QmlProject" version 1.1 is not installed -