Results 1 to 2 of 2

Thread: How to set screen orientatiion to portrait in Qt SDK

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2011
    Posts
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Symbian S60

    Default How to set screen orientatiion to portrait in Qt SDK

    hello
    I want portrait orientation on clicking rotate button in QT SDK emulator

    Thanks

  2. #2
    Join Date
    Apr 2009
    Location
    Valencia (Spain)
    Posts
    245
    Thanks
    38
    Thanked 19 Times in 19 Posts
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: How to set screen orientatiion to portrait in Qt SDK

    You need to use Symbian C++ code.

    Qt Code:
    1. #if defined(Q_WS_S60)
    2. {
    3. // For locking rotation in Symbian
    4. CAknAppUi* appUi = dynamic_cast<CAknAppUi*>(CEikonEnv::Static()->AppUi());
    5. if(appUi)
    6. {
    7. QT_TRAP_THROWING(appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape))
    8. }
    9.  
    10. w.showMaximized();
    11. }
    To copy to clipboard, switch view to plain text mode 

    Don't forget to add the libs in the pro file

    Qt Code:
    1. symbian {
    2. LIBS += -lavkon -lcone -lcntmodel -leiksrv
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Replies: 3
    Last Post: 25th January 2011, 13:36
  2. Replies: 0
    Last Post: 19th January 2011, 03:29
  3. Replies: 2
    Last Post: 11th June 2010, 07:23
  4. landscape to portrait
    By Kunjal Garach in forum Newbie
    Replies: 3
    Last Post: 16th May 2010, 22:53
  5. Replies: 5
    Last Post: 18th January 2008, 18:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.