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 Update on Monday, May 27th 2025

[SOLVED] Force Screen Orientation Android to Landscape

Scheduled Pinned Locked Moved General and Desktop
qscreenlandscapeandroidorientation
5 Posts 3 Posters 9.1k 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.
  • N Offline
    N Offline
    nanoandrew4
    wrote on 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.

    vishnuV 1 Reply Last reply
    0
    • N nanoandrew4

      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.

      vishnuV Offline
      vishnuV Offline
      vishnu
      wrote on 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
      1
      • vishnuV vishnu

        @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 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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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
          1
          • SGaistS SGaist

            Hi,

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

            N Offline
            N Offline
            nanoandrew4
            wrote on 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

            • Login

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