[SailfishDevel] QAccelerometer availability ?

Franck Routier (perso) alci at mecadu.org
Sun Jan 12 10:49:42 UTC 2014


I'm still stuck with this. Back to the basics...

In my qml, I have added:

import QtSensors 5.0 and used Accelerometer.

Fine. But On deployment, I get an error: module "QtSensors" is not installed

I think I have to edit something in my .pro file: I tried
CONFIG += qt5-qtsensors

but it didn't work.

Maybe I should also make changes in the rpm yaml, although I think as it
is available by default, I shouldn't.

Could someone give me a pointer on "putting Qt / qml modules in my
project classpath" ?

Thanks in advance,

Le 11/01/2014 18:22, Mike Sheldon a écrit :
> Hi Frank,
> On Sat, 2014-01-11 at 18:03 +0100, Franck Routier (perso) wrote:
>> So: is QAccelerometer available in Sailfish SDK ?
>> If not, is it planned ?
>> Or is there another way to get this kind of features ?
>  They're part of the QtSensors module which is available in the
> packages: "qt5-qtsensors" and "qt5-qtdeclarative-import-sensors" (for
> QML support). They're both on the Harbour approved list, so you don't
> need to worry about bundling them with your app or anything.
>  I'm currently using the QML Accelerometer element in a game, so I can
> confirm it works correctly.
> Cheers,
>  Mike.
> _______________________________________________
> SailfishOS.org Devel mailing list

More information about the Devel mailing list