How to rotate/change the orientation of ApplicationWindow QML?

4.9k Views Asked by At

I would like to by default set my app at 180 degree orientation. What is the API to rotate the screen at ApplicationWindow level? I have toolbars and statusbars in my app, so I need to rotate the ApplicationWindow itself.

1

There are 1 best solutions below

1
Léo Baudouin On BEST ANSWER

You can use a Page component as main component in your ApplicationWindow

ApplicationWindow {
    visible: true
    width: 640
    height: 480
    title: qsTr("Hello World")

    Page{
        rotation: 180
        anchors.fill: parent

        footer: ToolBar{ ... }
    }
}

Result: attached image