×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    369

    Wrong screen orientation mode for QML app

    trying to create an app using pure qtquick qml and QtCreator 2.3.1 for N9/N950,
    i used the wizard and selected portrait only but when i run the app on N950 its in landscape mode
    the code inserted in the main.cpp viewer->setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape); doesnt seem to be working on Meego

    I know that if i use Qt-components then i use the Page orientationlock property but i dont require the Qt-components so i dont think its usefull to import that entire lib for just portrait mode
    (if Qt-component can do it then surely i can do it as well, just dont know how)


    how can i fix this?

  2. #2
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    200

    Re: Wrong screen orientation mode for QML app

    Have you tried this?

    Code:
    import QtQuick 1.1
    import com.nokia.meego 1.0
    
    
    
    
    PageStackWindow {
        ...
        initialPage: mainPage
        ...
    }
     
    Page {
        id: mainPage
        ...
        // Lock the screen orientation to portrait.
        orientationLock: PageOrientation.LockPortrait
        ...
    }
    See more from:
    http://harmattan-dev.nokia.com/docs/..._rotation.html

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    369

    Re: Wrong screen orientation mode for QML app

    Yes, i know of Qt-components and i've mentioned in my original message, but since my app is pure qml and doesnt require Qt-components i dont see the point of importing the entire lib just to enable portrait lock...

    surely there is a way to achieve that just like the Qt-component achieve it under the hood.

  4. #4
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    200

    Re: Wrong screen orientation mode for QML app

    oh, got mixed with qt-thisandthat

  5. #5
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    200

    Re: Wrong screen orientation mode for QML app

    You can always start digging through qt-components sources to see what it does. I guess here is one starting point http://qt.gitorious.org/qt-component...mbian/Page.qml

Similar Threads

  1. Replies: 2
    Last Post: 2010-11-26, 10:04
  2. detect orientation mode after using setOrientation function
    By Zhuwei in forum Symbian User Interface
    Replies: 15
    Last Post: 2009-09-09, 02:21
  3. Screen Orientation
    By devdattac in forum Mobile Java General
    Replies: 1
    Last Post: 2009-07-29, 06:32
  4. Wrong NaviPaneText after orientation change
    By dracula78 in forum Symbian User Interface
    Replies: 9
    Last Post: 2008-05-20, 16:31
  5. screen orientation
    By davidmaxwaterman in forum Symbian
    Replies: 0
    Last Post: 2006-12-31, 07:27

Posting Permissions

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