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