Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Screen orientation QML ApplicationWindow
QtWS25 Last Chance

Screen orientation QML ApplicationWindow

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 4.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 8 Offline
    8 Offline
    888rok
    wrote on last edited by
    #1

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

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DonRico
      wrote on last edited by
      #2

      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 ":http://developer.android.com/guide/topics/manifest/activity-element.html

      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

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JvdGlind
        wrote on last edited by
        #3

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

        @import QtQuick 2.0

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

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

        }@

        Jeffrey VAN DE GLIND
        Principle Consultant @ Nalys
        www.nalys-group.com

        1 Reply Last reply
        0
        • 8 Offline
          8 Offline
          888rok
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved