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. How to fix screen orientation to landscape in Qt?

How to fix screen orientation to landscape in Qt?

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 2.0k Views 2 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.
  • Venkatesh VV Offline
    Venkatesh VV Offline
    Venkatesh V
    wrote on last edited by
    #1

    Hi all,

    I have written a simple Qt Application and it runs on Android device. The Application is designed to use in landscape mode and I want to fix it. That means if I rotate my device the screen should also stay in landscape. The user has only the chance to use in landscape.

    Thanks a lot.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      That's something you do in the Android manifest file. You can generate from Qt Creator and edit it there to lock the screen orientation.

      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
      2
      • Venkatesh VV Offline
        Venkatesh VV Offline
        Venkatesh V
        wrote on last edited by
        #3

        Thaks for your valuable reply @SGaist ...
        As I am a beginner to Qt so can you please give me detail information about it....

        1 Reply Last reply
        1
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Qt Creator deploying Android
          Qt 5 Android deployment
          Fix rotation in manifest file

          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
          3
          • Venkatesh VV Offline
            Venkatesh VV Offline
            Venkatesh V
            wrote on last edited by
            #5

            Hi Thanks for your reply @SGaist ...
            Is there any way to do this using programatically apart from changing in manifest file?

            Thanks.

            1 Reply Last reply
            1
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              I'm not aware of such a possibility directly from Qt (doesn't mean it doesn't exists though)

              You might have to write a bit of Java for that.

              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
              2
              • Venkatesh VV Offline
                Venkatesh VV Offline
                Venkatesh V
                wrote on last edited by
                #7

                Thank You so much @SGaist
                It Worked..

                1 Reply Last reply
                1

                • Login

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