Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QCompass on iOS using Qt 5.2.0-beta1

    Mobile and Embedded
    4
    10
    3288
    Loading More Posts
    • 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
      cezmen last edited by

      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 Reply Quote 0
      • C
        cezmen last edited by

        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 Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          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 Reply Quote 0
          • C
            cezmen last edited by

            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 Reply Quote 0
            • C
              cezmen last edited by

              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 Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                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 Reply Quote 0
                • A
                  ainwoodblackberry.com last edited by

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

                  1 Reply Last reply Reply Quote 0
                  • C
                    cezmen last edited by

                    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 Reply Quote 0
                    • A
                      AlterX last edited by

                      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 Reply Quote 0
                      • A
                        ainwoodblackberry.com last edited by

                        Thanks cezmen, that's what I needed.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post