i've written the same code but i get this result
error: 'QSensor' was not declared in this scope
what's wrong?
i've written the same code but i get this result
error: 'QSensor' was not declared in this scope
what's wrong?
Didn't set the namespace or use the "QtMobility::" prefix?
Solution
If you want to use QSensor in qt creator. follow these steps.
1. open project file .prj and add
CONFIG += mobility
MOBILITY += sensors
2. open open header file where you want to include and add
#include <QSensor> //include this file
using namespace QtMobility; //add this line after header file declarations
3. create a object and start using.
[/INDENT][/CENTER]
use the macro QTM_USE_NAMESPACE
__
http://svaj.hostei.com/