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. create tablet application and avoid rotation using qtwidget

create tablet application and avoid rotation using qtwidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 5 Posters 393 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.
  • S Offline
    S Offline
    SherifOmran
    wrote on last edited by
    #1

    I am trying to develop a tablet application with qtwidget and not qml and i want to avoid rotation and keep in vertical mode.
    any idea how to active?

    jsulmJ Pradeep P NP 2 Replies Last reply
    0
    • S SherifOmran

      I am trying to develop a tablet application with qtwidget and not qml and i want to avoid rotation and keep in vertical mode.
      any idea how to active?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @SherifOmran Probably using the native APIs of the underlying OS (iOS/Android what ever).

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        Did you try the manifest file?
        https://stackoverflow.com/questions/20774498/qml-screen-orientation-lock
        should also work with widgets.

        1 Reply Last reply
        5
        • J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          To add to the others,

          in iOS you have these entries in the info.plist file

          <key>UISupportedInterfaceOrientations</key>
                  <array>
                          <string>UIInterfaceOrientationPortrait</string>
                          <string>UIInterfaceOrientationPortraitUpsideDown</string>
                          <string>UIInterfaceOrientationLandscapeLeft</string>
                          <string>UIInterfaceOrientationLandscapeRight</string>
                  </array>
          

          for allowed orientations


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          1 Reply Last reply
          5
          • S SherifOmran

            I am trying to develop a tablet application with qtwidget and not qml and i want to avoid rotation and keep in vertical mode.
            any idea how to active?

            Pradeep P NP Offline
            Pradeep P NP Offline
            Pradeep P N
            wrote on last edited by
            #5

            @SherifOmran
            This is i use for iOS (Adding to @J-Hilk)

            It only supports Portrait Orientation.

                <array>
                    <string>UIInterfaceOrientationPortrait</string>
                    <!--
                    <string>UIInterfaceOrientationPortraitUpsideDown</string>
                    <string>UIInterfaceOrientationLandscapeLeft</string>
                    <string>UIInterfaceOrientationLandscapeRight</string>
                    -->
                </array>
            

            All the best.

            Pradeep Nimbalkar.
            Upvote the answer(s) that helped you to solve the issue...
            Keep code clean.

            1 Reply Last reply
            4
            • S Offline
              S Offline
              SherifOmran
              wrote on last edited by
              #6

              thank you guys for the notes. I usually use Qt directly to test the applicaiton on the table. So far, i know when the application is finished, i convert it to xcode and inside it, i can plug the info file.
              Is there an easier way to use info.plist files from inside Qt ?

              jsulmJ 1 Reply Last reply
              0
              • S SherifOmran

                thank you guys for the notes. I usually use Qt directly to test the applicaiton on the table. So far, i know when the application is finished, i convert it to xcode and inside it, i can plug the info file.
                Is there an easier way to use info.plist files from inside Qt ?

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @SherifOmran Like explained here?
                https://doc.qt.io/qt-5/ios-platform-notes.html

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                2

                • Login

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