×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    445

    Portrait lock problem in Symbian

    Hi,

    When I lock the orientation in Qml on Symbian to portrait but the phone is in landscape orientation then my app is cropped (e.g. only half of the screen is used).
    Exactly the same problem (including a sample screenshot) is posted here: http://qt-project.org/forums/viewthread/17132

    (the problem seems also to occure on the N900: http://www.developer.nokia.com/Commu...n_in_landscape).

    The Qml code producing the problem is very simple:
    Code:
    import com.nokia.symbian 1.1
    PageStackWindow {
    Page {
            anchors.fill: parent
            orientationLock: PageOrientation.LockPortrait
    }
    }
    And in c++ before showing the Qml view:
    Code:
    qmlView.setAttribute(Qt::WA_LockPortraitOrientation, true);
    How can this problem be fixed?
    Regards,

  2. #2
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Portrait lock problem in Symbian

    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait);
    working fine for me.

  3. #3
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    445

    Re: Portrait lock problem in Symbian

    For me it does not work. As a solution I am now rotating my page by -90° if phone is in landscape. This works quite well.

  4. #4
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: Portrait lock problem in Symbian

    There seems to be a bog already reported and closed for the same issue.

    https://bugreports.qt-project.org/br...OMPONENTS-1201

    Can you please check the last comment. I see that you are doing the same way anyways, keeping the orientationLock in qml.

    Can you remove in your c++ code and check the same too.

    You can also act as mentioned in the last comment in the bug by posting your observations for the work around mentioned.

  5. #5
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Portrait lock problem in Symbian

    if you want to lock only one page from your application then you can use qml property orientationLock: PageOrientation.LockPortrait but if you want the behavior should be same to entire application better to use C++ side code.

Similar Threads

  1. Replies: 26
    Last Post: 2011-11-14, 14:39
  2. Change portrait to landscape problem
    By ashutosh12 in forum Symbian
    Replies: 3
    Last Post: 2009-03-31, 06:41
  3. Problem switching between portrait and landscape
    By Tatanka.nbr1 in forum Symbian
    Replies: 0
    Last Post: 2006-05-16, 19:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •