Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. App is always launched in landscape orientation in N9
Forum Updated to NodeBB v4.3 + New Features

App is always launched in landscape orientation in N9

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 4 Posters 3.0k 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.
  • S Offline
    S Offline
    srikanth_trulyit
    wrote on last edited by
    #1

    I am porting a QML app from Symbian to N9. When launched it always defaults to landscape. To my surprise the following properties of Screen component are wrongly returned.

    screen.width is:854
    screen.displayWidth is:854
    screen.orientation is:270

    The device is properly placed in portrait orientation. Locking orientation of Page (s) to PageOrientation.LockPortrait has no effect.
    I am using com.nokia.meego 1.0, QtQuick 1.1 with PageStackWindow.
    Any solutions to this problem?

    Thanks in advance.
    Srikanth

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      Have a look at "this solved thread":http://developer.qt.nokia.com/forums/viewthread/8546.

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • S Offline
        S Offline
        srikanth_trulyit
        wrote on last edited by
        #3

        Using Widget component is not solving my problem. I see that the default is always landscape, as with X window system being landscape. So the values of width, height are being swapped. So any code like

        @Text {
        width: screen.width; // or screen.displayWidth
        }@

        will go for a toss.

        A simple work around would be to rely on anchoring. The above code can be re-told as
        @Text {
        anchors.fill: parent;
        }@

        But with the above code I am not sure if orientation works as with screen.width property changes.

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lavonardo
          wrote on last edited by
          #4

          Without seeing the code, it's hard to give any precision-advice.

          The easiest way to control the application is to utilize Qt Quick Components.

          And doing exactly that is explained in the Harmattan Developer Library (http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_Developing_for_Harmattan_Controlling_rotation.html).

          Hopefully that information comes in helpful.

          1 Reply Last reply
          0
          • L Offline
            L Offline
            luca
            wrote on last edited by
            #5

            I have the same problem.

            I simply created e new mobile widget Qt application with only a QLabel in the center.

            When I deploy in my N9 I only see the MainWindow in Landscape.

            Is this a bug?

            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