2

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.

Xplatforms
  • 2,102
  • 17
  • 26
jxgn
  • 741
  • 2
  • 15
  • 36

1 Answers1

5

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

  • Thanks :) In the code that I have, I replaced toolbar with statusbar and rotated that as well as the stackview I had. Works fine :) – jxgn Nov 10 '17 at 09:30