×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Force application to landscape mode / full screen display

    Hello Folks,
    it's me again - I have decided to undertake the impossible: creating a realtime game in Qt for S60.

    In order to do this, I would need two things:

    a) How can I force the device into landscape mode. It doesn't have to be the system - if I can get the QPainter to swap the x and y axis, its ok too.

    b) How can I get my QMainWindow to not display the applicaton title and exit button?
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

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

    Re: Force application to landscape mode / full screen display

    Code:
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        
        // lock orientation
        CAknAppUi* appUi = dynamic_cast<CAknAppUi*>(CEikonEnv::Static()->AppUi());
        if(appUi){
            QT_TRAP_THROWING(appUi ->SetOrientationL( CAknAppUi::EAppUiOrientationLandscape));
        }
        
        ScreenDemo w(&a);
    
        // force full-screen mode
        w.showFullScreen();
        return a.exec();
    }

  3. #3
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Force application to landscape mode / full screen display

    Hi,
    thank you so much!

    However, when editing the mmp file to add the required libraries, I get Carbide whining about how I am editing a "derived file".

    WHat is going on here?
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  4. #4
    Regular Contributor
    Join Date
    Oct 2008
    Location
    Oslo, Norway
    Posts
    329

    Re: Force application to landscape mode / full screen display

    Quote Originally Posted by tamhanna View Post
    whining about how I am editing a "derived file".
    In Qt for Symbian, .mmp is generated automatically by qmake, based on your .pro file. You typically should not edit .mmp directly - add your libraries into .pro file instead, see here.

  5. #5
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Force application to landscape mode / full screen display

    mispost mispost
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  6. #6
    Registered User
    Join Date
    Nov 2007
    Location
    Ibadan, Nigeria
    Posts
    214

    Re: Force application to landscape mode / full screen display

    Did it work ?
    - David

  7. #7
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Force application to landscape mode / full screen display

    Hi,
    partially.

    The landscape mode switch works - but the stupid action button and the title bar still are displayed!
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  8. #8
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Force application to landscape mode / full screen display

    I forgot to add something: the MainWindow is shown as set up in the .ui file.
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  9. #9
    Regular Contributor
    Join Date
    Mar 2009
    Posts
    430

    Re: Force application to landscape mode / full screen display

    Use showFullscreen instead of showMaximized in your main.cpp

  10. #10
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Force application to landscape mode / full screen display

    Already found it, thx!

    To add: the main.cpp does NOT seem to get edited. So there is no risk of a fight between Carbide and you.
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  11. #11
    Regular Contributor
    Join Date
    Sep 2010
    Location
    India
    Posts
    75

    Re: Force application to landscape mode / full screen display

    I'm trying almost the same thing but ib Carbide,C++.
    I want my app to launch and stay in landscape mode till the user exits the app.

    Any idea guys....i'm clueless...

    thnks in advance...
    Last edited by Megh; 2010-10-11 at 06:40. Reason: Incomplete reply.

  12. #12
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Force application to landscape mode / full screen display

    See the code below, from "markboost". It's all you need. (Well, not quite. also #include <AknAppUi.h> and add libs avkon, cone, and eiksrv to your PRO file.)

Similar Threads

  1. Full Screen Mode for N97 Device
    By anavalamudi in forum Mobile Java General
    Replies: 5
    Last Post: 2010-01-05, 11:05
  2. Replies: 2
    Last Post: 2009-05-12, 05:24
  3. Direct screen access & display mode
    By girish_n in forum Symbian
    Replies: 1
    Last Post: 2008-02-12, 08:33
  4. Full Screen Mode GPRS Connection Icon
    By murid in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-08-05, 14:46
  5. UI: Full Screen Mode
    By GENERAL_INFO in forum Symbian User Interface
    Replies: 3
    Last Post: 2004-11-22, 06: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
  •  
×