Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-71388

setAxesOrientationMode() of QRotationSensor not works

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.11.1
    • Sensors
    • None
    • LG G&, LG G2, Samsung A3, Honor 6, Asus ZenPad 10
    • Android

    Description

      My app runs completely in landscape mode (android:screenOrientation="landscape").

      It runs correctly on my smartphones, but on my tablets the angles (horizon, elevation) of the QRotationssensor delivers values from the portrait mode.

      The reason is that the accelerator coordinate axes relates to the default orientation, and this is by smartphones 'portrait' and by tablets 'landscape'. So I have to rotate the coordinate system, otherwise QRotationSensor delivers wrong values if keeping the device in landscape format.

      m_pQrs = new QRotationSensor(this);
      m_pQrs->setAxesOrientationMode(QSensor::UserOrientation);
      m_pQrs->setUserOrientation(90);
      
      qDebug() << "currentOrientation " << m_pQrs->currentOrientation(); // 0
      qDebug() << "isFeatureSupported " << m_pQrs->isFeatureSupported(QSensor::AxesOrientation); // false
      

      I tested setAxesOrientationMode() on different smartphones and tablets and unfortunately it works on no devices. So currently it's not possible to use tablets for AR/VR applications with Qt.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lpotter Lorn Potter
            tiroler Armin Fuchs
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes