Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QCompass on iOS using Qt 5.2.0-beta1
QtWS25 Last Chance

QCompass on iOS using Qt 5.2.0-beta1

Scheduled Pinned Locked Moved Mobile and Embedded
10 Posts 4 Posters 3.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cezmen
    wrote on last edited by
    #1

    Did anyone succeed on accessing the Compass sensor of an iPhone using QCompass and QCompassFilter classes with Qt 5.2.0-beta1 version? I've tried it through several different ways, with no success. I'm using XCode 4.6.3 and iOS 6.0.1.

    The exact issue is that "bool QSensor::start()" method always returns "false" and then nothing happens.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cezmen
      wrote on last edited by
      #2

      According to the "Compatibility Map" of Qt 5.2 Sensors, the following features are supposed to work on iOS : Accelerometer, Compass, Gyroscope, Magnetometer and Proximity Sensors.

      http://qt.apidoc.info/5.2.0-beta1/qtsensors/compatmap.html

      In my tests, neither Accelerometer nor Compass are working.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        Did you test it on the simulator or a real device ? AFAIK, the simulator doesn't provide everything a device does.

        In the second case, you should check the "bug report system":http://bugreports.qt-project.org To see whether it something known. If not you can open a new report providing a minimal compilable example that shows the bug.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cezmen
          wrote on last edited by
          #4

          Thank you. I actually tested on a real device (iPhone 4s / iOS 6.0.1). However, it seems that no sensor works correctly (QSensor::start() always returns false). I'll check the "bug report system".

          1 Reply Last reply
          0
          • C Offline
            C Offline
            cezmen
            wrote on last edited by
            #5

            Definitely, QSensor class is not working yet for iOS devices (with Qt 5.2.0-beta1) version. I've tried several simple test Apps for instantiating and detecting sensors on several devices (iPhone and iPad), with different versions of XCode (4.6.3 and 5.0.1) and iOS (iOS5 , iOS6 and iOS7).

            QSensor::sensorTypes() should return a list of available sensors but, instead, returns an empty list. As there aren't sensors available, QSensor::start() always returns false (failing to start any sensor).

            I hope we all have a better luck with the final release of Qt 5.2.0.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              You should rather ask the status on the interest mailing list, during the DD in Berlin there was a demonstration using QtQuick and the accelerometers
              so there should be something

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • A Offline
                A Offline
                ainwoodblackberry.com
                wrote on last edited by
                #7

                Any idea if this has been fixed? I'm using 5.2.1 and am seeing the same issue.

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  cezmen
                  wrote on last edited by
                  #8

                  To make sensors work with iOS Apps, just make sure the following statements are included in your .PRO files :

                  QT += sensors
                  QTPLUGIN += qtsensors_ios

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    AlterX
                    wrote on last edited by
                    #9

                    I think it is the same of this one:
                    https://bugreports.qt-project.org/browse/QTBUG-35277

                    Qt Ambassador
                    Real-time cooperative teams: http://www.softairrealfight.net
                    Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

                    https://codereview.qt-project.org/...

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      ainwoodblackberry.com
                      wrote on last edited by
                      #10

                      Thanks cezmen, that's what I needed.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved