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
Qt 6.11 is out! See what's new in the release blog

[SOLVED] Force Screen Orientation Android to Landscape

Scheduled Pinned Locked Moved General and Desktop
qscreenlandscapeandroidorientation
5 Posts 3 Posters 12.3k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by A Former User
    #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
    • ? A Former User

      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"

      ? 1 Reply Last reply
      0
      • 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"

        ? Offline
        ? Offline
        A Former User
        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

          ? 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

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

            ? Offline
            ? Offline
            A Former User
            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