Results 1 to 3 of 3

Thread: How to use/configure QtSensors

  1. #1
    Join Date
    May 2011
    Posts
    5
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default How to use/configure QtSensors

    Hi everyone,

    i want to try how sensors work.
    How can i include "QtSensors" module into a project?

    I have installed the latest Qt SDK 1.1.
    Why can't i simply write in ".pro" file
    Qt Code:
    1. CONFIG += mobility
    2. MOBILITY += sensors
    To copy to clipboard, switch view to plain text mode 

    and in ".h" file add
    #include <QSensor>
    and then declare variable
    QSensor* sensor;
    ????

    This is really frustrating...


    Thx!
    Marina

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to use/configure QtSensors

    Zdravo Marina,

    have a look here:
    http://doc.qt.nokia.com/qtmobility/installation.html
    and look below under "Making the libraries available to applications"
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    May 2011
    Posts
    5
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: How to use/configure QtSensors

    Zdravo high_flyer hehe
    Thx for the reply.

    If anyone has the same problem, solution is to add "QTM_USE_NAMESPACE" below "#include" part in ".h" file

    This is how ".pro" file looks like:
    Qt Code:
    1. QT=core gui
    2. CONFIG += mobility strict_flags
    3. MOBILITY += sensors
    4. INCLUDEPATH += ../../../src/sensors
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. configure QT 4.6.2
    By QT-embedded in forum Installation and Deployment
    Replies: 1
    Last Post: 3rd April 2010, 15:26
  2. configure??? qt 4.6.2
    By QT-embedded in forum Newbie
    Replies: 9
    Last Post: 18th March 2010, 14:38
  3. Configure
    By kpmsivachand in forum Qt Programming
    Replies: 2
    Last Post: 25th February 2009, 04:54
  4. Configure Qt
    By Krish_ng in forum Qt Programming
    Replies: 7
    Last Post: 26th July 2007, 11:38
  5. configure, then what?
    By Morea in forum Installation and Deployment
    Replies: 9
    Last Post: 5th March 2006, 19:10

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.