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

No working API to lock screen orientation

    XMLWordPrintable

Details

    Description

      I need to lock my app into portrait mode. But the only Qt API that I can find,
      does not work.

      On Symbian with Qt >= 4.7.2 the following works:
      QWidget::setAttribute(Qt::WA_LockPortraitOrientation)

      There is also:
      Qt::WA_LockLandscapeOrientation
      Qt::WA_AutoOrientation

      If I use Qt Creator from MeeGo SDK 1.2 and use the QML/C++ wizard, it will
      create code that uses the above API.

      ===========================================================

      EXACT STEPS LEADING TO PROBLEM:
      ===========================================================
      1. Call: mainwin->setAttribute(Qt::WA_LockPortraitOrientation)
      2. Hold the device in landscape mode

      EXPECTED OUTCOME:
      The app is displayed in portrait mode, regardless of the devices physical
      orientation.

      ACTUAL OUTCOME:
      The app is displayed in landscape mode

      There is related bug reported at https://bugs.meego.com/show_bug.cgi?id=17200

      USER IMPACT:
      No portrait or landscape only apps

      REPRODUCIBILITY:
      Always

      Attachments

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

        Activity

          People

            martjone Martin Jones (closed Nokia identity) (Inactive)
            shenghua Shenghua Liu (Inactive)
            Votes:
            11 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes