Discussion:
QtMobility development
Mark S. Townsley
2011-05-08 21:38:22 UTC
Permalink
Hi:

I want to use some QtMobility API. Is QtMobility already part of MeeGo
SDK?

thanks


Mark
Chen, Zhang Z
2011-05-08 22:26:05 UTC
Permalink
Yes, just add "CONFIG+=mobility" and "MOBILITY+=XXXX" (where XXXX is the mobility module you'd like to use) to your .pro file

From: meego-sdk-bounces-***@public.gmane.org [mailto:meego-sdk-bounces-***@public.gmane.org] On Behalf Of Mark S. Townsley
Sent: Monday, May 09, 2011 5:38 AM
To: meego-sdk-***@public.gmane.org
Subject: [MeeGo-SDK] QtMobility development

Hi:

I want to use some QtMobility API. Is QtMobility already part of MeeGo SDK?

thanks


Mark
Mark S. Townsley
2011-05-08 22:47:13 UTC
Permalink
Thanks Zhang.

I did that. In my .pro, I have

CONFIG += mobility
MOBILITY += sensor

I ran qmake

In my C++, I have #include <QSensor> which is what I read from Qt
documentations.
It turns out, it should be #include <QtSensors/QSensor>.
I changed that and then I have this C++ line:

QSensor sensor("QAccelerometer");

When I compile inside QtCreator, it complains QSensor was not declared.

I look at qsensor.h and I do see QSensor class. Do you know what step(s)
am I missing?


Mark
Yes, just add “CONFIG+=mobility” and “MOBILITY+=XXXX” (where XXXX is the
mobility module you’d like to use) to your .pro file
Behalf Of *Mark S. Townsley
*Sent:* Monday, May 09, 2011 5:38 AM
*Subject:* [MeeGo-SDK] QtMobility development
I want to use some QtMobility API. Is QtMobility already part of MeeGo SDK?
thanks
Mark
Chen, Zhang Z
2011-05-08 22:55:48 UTC
Permalink
Maybe you should add "QTM_USE_NAMESPACE" to your cpp file?

From: Mark S. Townsley [mailto:mstownsley-***@public.gmane.org]
Sent: Monday, May 09, 2011 6:47 AM
To: Chen, Zhang Z
Cc: meego-sdk-***@public.gmane.org
Subject: Re: [MeeGo-SDK] QtMobility development

Thanks Zhang.

I did that. In my .pro, I have

CONFIG += mobility
MOBILITY += sensor

I ran qmake

In my C++, I have #include <QSensor> which is what I read from Qt documentations.
It turns out, it should be #include <QtSensors/QSensor>.
I changed that and then I have this C++ line:

QSensor sensor("QAccelerometer");

When I compile inside QtCreator, it complains QSensor was not declared.

I look at qsensor.h and I do see QSensor class. Do you know what step(s) am I missing?


Mark

On Sun, May 8, 2011 at 3:26 PM, Chen, Zhang Z <zhang.z.chen-***@public.gmane.org<mailto:zhang.z.chen-***@public.gmane.org>> wrote:
Yes, just add "CONFIG+=mobility" and "MOBILITY+=XXXX" (where XXXX is the mobility module you'd like to use) to your .pro file

From: meego-sdk-bounces-***@public.gmane.org<mailto:meego-sdk-bounces-***@public.gmane.org> [mailto:meego-sdk-bounces-***@public.gmane.org<mailto:meego-sdk-bounces-***@public.gmane.org>] On Behalf Of Mark S. Townsley
Sent: Monday, May 09, 2011 5:38 AM
To: meego-sdk-***@public.gmane.org<mailto:meego-sdk-***@public.gmane.org>
Subject: [MeeGo-SDK] QtMobility development

Hi:

I want to use some QtMobility API. Is QtMobility already part of MeeGo SDK?

thanks


Mark
m***@public.gmane.org
2011-05-09 06:23:29 UTC
Permalink
Hi,

Also it is
MOBILITY += sensors
Please note the s at the end. Typo which happened to me as well :)

BR,
Maurice
-----Original Message-----
On Behalf Of ext Mark S. Townsley
Sent: Monday, 09 May, 2011 00:47
To: Chen, Zhang Z
Subject: Re: [MeeGo-SDK] QtMobility development
Thanks Zhang.
I did that. In my .pro, I have
CONFIG += mobility
MOBILITY += sensor
I ran qmake
In my C++, I have #include <QSensor> which is what I read from Qt
documentations.
It turns out, it should be #include <QtSensors/QSensor>.
QSensor sensor("QAccelerometer");
When I compile inside QtCreator, it complains QSensor was not declared.
I look at qsensor.h and I do see QSensor class. Do you know what
step(s) am I missing?
Mark
Yes, just add "CONFIG+=mobility" and "MOBILITY+=XXXX" (where XXXX
is the mobility module you'd like to use) to your .pro file
Sent: Monday, May 09, 2011 5:38 AM
Subject: [MeeGo-SDK] QtMobility development
I want to use some QtMobility API. Is QtMobility already part of MeeGo SDK?
thanks
Mark
Loading...