How to set GUI to always run in landscape orientation



  • Hello,

    I have an app that fills the whole screen whenever I start it up, in spite of explicitly setting in my MainWindow constructor that the widget should have a width of 320 and height 240:

    ui->centralWidget->setFixedSize(320,240);
    

    I was hoping that this would set the app to run as landscape every time, with the specified width and height. But the window expands to occupy the whole screen, with the usable area of my app at the upper left corner of the window, and the rest is just blank.

    How do I set my app to run always in landscape orientation?

    Thanks,


  • Lifetime Qt Champion

    Hi,

    What platform are you targeting ?



  • I am targeting a custom board with a 3.5 inch (320 x 240) display. I built the app using Qt 4.8.5, I was thinking that there might be some methods to lock the app orientation, or is screen orientation hardware specific?

    Thanks


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.