Important: Please read the Qt Code of Conduct -

Screen orientation QML ApplicationWindow

  • Hi,
    is it possible to change orientation on ApplicationWindow? I'm using qml+qt in windows

  • Hi

    Well, it depends for which platform you're developing for. I'm guessing that you want to change (fix to one) on some kind mobile device. So for android you need to create a AndroidManifest.xml .

    For that go to Projects -> Select your Android kit -> run -> Deploy configuraiton -> Create AndroidManifest.xml

    When the new screen opens select XML source from the top part of the screen and make sure that the <activity tag has a android:screenOrientation="portrait" in it. You can find additional "screen orientation properties from here ":

    Not sure if that help since I wasn't 100% sure what you were asking but let us know if you were looking for something else. And it's always good to mention which Qt version you're using. You can find it from Tools-> Options -> Build & Run -> Qt Versions

  • I am using this item as container to force a portrait on a landscape OS.

    @import QtQuick 2.0

    Item {
    anchors.left: parent.left; parent.bottom;

    width: parent.height;
    height: parent.width;
    transform: Rotation { origin.x: 0; origin.y: 0; angle: 270 }


  • DonRico: I'm developing for windows platform. I think that JvdGlind's solution works.
    Thanks 4 replies.

Log in to reply