Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User jtb63's Avatar
    Join Date
    Jun 2011
    Posts
    4
    Hi,

    is there any simple way to prevent screen automatically turn (like in Symbian with Qt::WA_LockPortraitOrientation) ?

    I tried locking with Page but that did not worked always.

    My app is mentioned for portrait only, it does not make sense to have it turn to horizontal.

  2. #2
    Registered User SaiHtun's Avatar
    Join Date
    Jun 2011
    Posts
    8
    orientationLock: PageOrientation.LockPortrait works for me.

  3. #3
    Nokia Developer Champion hartti's Avatar
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192
    SaiHtun's solution works for me too.
    jtb63, how did you try to lock the Page to portrait?

    Hartti

  4. #4
    Registered User rvogt's Avatar
    Join Date
    Mar 2003
    Posts
    34
    I have a similar problem. If I create a new Qt mobile application and choose "lock to portrait mode" in the wizard, the application starts in landscape mode on the n950. Anybody else with this problem?

  5. #5
    Registered User SaiHtun's Avatar
    Join Date
    Jun 2011
    Posts
    8
    Use page orientation lock. Check this link http://library.developer.nokia.com/......ion_Porting_applications_to_Harmattan_e46e.html
    It won't work if you slide out the keypad of N950. But N9 doesn't have a keypad so it wouldn't be a problem.

  6. #6
    Registered User rvogt's Avatar
    Join Date
    Mar 2003
    Posts
    34
    So no chance to lock the device to portrait mode without Qt Quick at the moment?

  7. #7
    Nokia Developer Champion hartti's Avatar
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192
    Technically it should be possible to wrap the non-QML UI in some other Qt widget, which then allows you to lock the screen size/orientation (I do not have the specifics on how to do that as I do not know Qt well enough myself). There could be some unwanted consequences in this kind of approach, like in the event propagation or getting virtual keyboard to show in correct orientation. Porting your UI to QML/Qt Quick is recommended and more future proof approach.

    Hartti

  8. #8
    Registered User rvogt's Avatar
    Join Date
    Mar 2003
    Posts
    34
    At the moment it is not an option to port our existing Qt application to Qt Quick. Hope there is another solution soon.
    Edit: there is already a bug report at: http://bugreports.qt.nokia.com/browse/QTBUG-19733 (please vote)
    Last edited by rvogt; 2011-07-08 at 11:08.

Similar Threads

  1. N9 / Harmattan cannot open xml file
    By jtb63 in forum Nokia N9
    Replies: 10
    Last Post: 2011-06-30, 13:40
  2. Replies: 1
    Last Post: 2009-10-28, 09:42
  3. Replies: 2
    Last Post: 2009-08-27, 10:32
  4. Screen Mode from portrait to landscape
    By rami75lu in forum Symbian User Interface
    Replies: 0
    Last Post: 2008-10-15, 04:57

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved