Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Force Screen Orientation Android to Landscape
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Force Screen Orientation Android to Landscape

Scheduled Pinned Locked Moved General and Desktop
qscreenlandscapeandroidorientation
5 Posts 3 Posters 9.2k Views 3 Watching
  • 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.
  • N Offline
    N Offline
    nanoandrew4
    wrote on 30 Sept 2015, 00:01 last edited by nanoandrew4
    #1

    How can I force set the orientation to Landscape in a mobile app and not make it possible to revert to portrait again? I have been looking at many examples, but they don't seem to work. Any help is appreciated.

    V 1 Reply Last reply 30 Sept 2015, 08:12
    0
    • N nanoandrew4
      30 Sept 2015, 00:01

      How can I force set the orientation to Landscape in a mobile app and not make it possible to revert to portrait again? I have been looking at many examples, but they don't seem to work. Any help is appreciated.

      V Offline
      V Offline
      vishnu
      wrote on 30 Sept 2015, 08:12 last edited by
      #2

      @nanoandrew4
      yes, you can do that!

      • go to your project->android folder

      • find AndroidManifest.xml file and open it.

      • find the line android:screenOrientation="landscape"

      N 1 Reply Last reply 30 Sept 2015, 20:57
      1
      • V vishnu
        30 Sept 2015, 08:12

        @nanoandrew4
        yes, you can do that!

        • go to your project->android folder

        • find AndroidManifest.xml file and open it.

        • find the line android:screenOrientation="landscape"

        N Offline
        N Offline
        nanoandrew4
        wrote on 30 Sept 2015, 20:57 last edited by
        #3

        @vishnu There is no android folder, It is not QML if that is relevant, I just made it QWidget. Is it preferable to use QML?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 30 Sept 2015, 21:10 last edited by
          #4

          Hi,

          The "Editing Manifest Files" in Qt Creator's android deployment guide explains how to generate it.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          N 1 Reply Last reply 30 Sept 2015, 23:46
          1
          • S SGaist
            30 Sept 2015, 21:10

            Hi,

            The "Editing Manifest Files" in Qt Creator's android deployment guide explains how to generate it.

            N Offline
            N Offline
            nanoandrew4
            wrote on 30 Sept 2015, 23:46 last edited by
            #5

            @SGaist Thank you so much, it's my first time with mobile and I'm still working it out. It worked perfectly, and also thank you for answering so quickly!

            1 Reply Last reply
            0

            5/5

            30 Sept 2015, 23:46

            • Login

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