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. Problem when locking screen orientation in Symbian app
Forum Updated to NodeBB v4.3 + New Features

Problem when locking screen orientation in Symbian app

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 3.1k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    mkfnx
    wrote on last edited by
    #1

    Hi, I'm having a problem when trying to lock the orientation of my app to portrait mode. It works almost everytime but when I launch the app with the phone in landscape mode the app doesn't get the correct dimensions and I end up with something like what is shown in the image.

    !http://dl.dropbox.com/u/387660/Scr000008.jpg(HalfScreen)!

    Any idea of what could be the problem and how to solve it?

    I'm using Qt 4.7.4 and Qt Quick 1.1.

    I have created the app with the Qt Creators wizard so my main.qml contains a PageStackWindow component
    I use the following lines in main.cpp to lock the apps orientation:

    @QmlApplicationViewer viewer;
    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait);
    (...)
    viewer.showExpanded();
    @

    I 've tested the app in my E7 an also in a N8 from the RDA, both with the same result.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Megaplayer
      wrote on last edited by
      #2

      Hi, I know that I am responding on older post but i have the same problem on my Nokia 603 (FP1) any solution for that?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mkfnx
        wrote on last edited by
        #3

        Yes there is a solution, I found that it is a reported bug https://bugreports.qt-project.org/browse/QTCOMPONENTS-1201

        So I asked in the bug repor page and they told me this:

        bq. You should be able to circumvent the issue by locking the orientation using the Page.orientationLock property ( http://doc.qt.nokia.com/qtquick-components-symbian-1.1/qml-page.html ), instead of locking the orientation using C++ API:s.
        Or if you are not using PageStack in the application you can use screen.allowedOrientations ( http://doc.qt.nokia.com/qtquick-components-symbian-1.1/qml-screen.html ).

        It worked fine for me.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Megaplayer
          wrote on last edited by
          #4

          Thanks for quick reply, now it works. Super!

          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