×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    38

    Question locking Screen Rotation on Belle with Nokia SDK 1.2

    Hi,

    I've started with a Qt Mobility Widget project template.

    There's some code regarding screen orientation predefined.

    Does
    Code:
    MainWindow::MainWindow(QWidget *parent)
        : QMainWindow(parent), ui(new Ui::MainWindow)
    {
        ui->setupUi(this);
        setOrientation(ScreenOrientationLockPortrait);
        setupGraphics();
    }
    lock screen rotation?

    With locked screen rotation I do not want the phone to do any screen pixel rotation by itself when the phone is rotated.

    Target: Symbian Belle, C7-00.
    Last edited by planetLars; 2012-02-15 at 18:12. Reason: Added target

  2. #2
    Registered User
    Join Date
    Apr 2011
    Posts
    115

    Re: locking Screen Rotation on Belle with Nokia SDK 1.2

    If you want the automatic rotation:
    setOrientation(ScreenOrientationAuto);

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

    Re: locking Screen Rotation on Belle with Nokia SDK 1.2

    On your main QWidget or QMainWindow or QGraphicsView call function

    setAttribute(Qt::WA_LockPortraitOrientation, true);

    This is for locking orientation to portrait, works same as the one posted in #1
    also similar to appUi->SetOrientationL( CAknAppUi::EAppUiOrientationPortrait); (if you want to use symbian)

    With all the above options, the screen is locked to portrait and the rotation of phone does not effect the UI.
    similarly for landscape in QT app you can use -

    setOrientation(ScreenOrientationLockLandscape) (or)

    Qt::WA_LockLandscapeOrientation

  4. #4
    Registered User
    Join Date
    Feb 2012
    Posts
    38

    Re: locking Screen Rotation on Belle with Nokia SDK 1.2

    Thank yous. setOrientation(ScreenOrientationLockPortrait); or one of their alternatives mentioned by kusumk are what I was looking for.

    Edit: in fact this is set in main.cpp already. Thus changing the argument appropriately there should suffice.
    Last edited by planetLars; 2012-02-17 at 15:29. Reason: added edit

Similar Threads

  1. Screen Rotation in Nokia 6220 Classic Phone
    By rajan701v in forum Mobile Java General
    Replies: 1
    Last Post: 2011-08-04, 07:12
  2. N9/Harmattan screen locking to portrait ?
    By jtb63 in forum Nokia N9
    Replies: 7
    Last Post: 2011-07-08, 08:45
  3. Screen rotation
    By ale152 in forum Symbian
    Replies: 2
    Last Post: 2009-08-20, 14:12
  4. Screen Size And Rotation on nokia n95 8GB
    By pinhassi in forum Symbian
    Replies: 3
    Last Post: 2008-10-02, 10:17
  5. Screen Rotation on Nokia 7650's and 9200 series
    By davidmiron in forum Symbian User Interface
    Replies: 1
    Last Post: 2002-10-04, 12: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
  •  
×