Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt 6.9.1 Android screen scale factor issues.
Forum Updated to NodeBB v4.3 + New Features

Qt 6.9.1 Android screen scale factor issues.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
11 Posts 3 Posters 312 Views 1 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.
  • JoeCFDJ Offline
    JoeCFDJ Offline
    JoeCFD
    wrote last edited by
    #2

    Is the Android version same on all devices?

    SMF-QtS 1 Reply Last reply
    0
    • JoeCFDJ JoeCFD

      Is the Android version same on all devices?

      SMF-QtS Offline
      SMF-QtS Offline
      SMF-Qt
      wrote last edited by
      #3

      @JoeCFD

      No the Simulator and Tablet are15 the A06 is 14 and the HTC 12.

      JoeCFDJ 1 Reply Last reply
      0
      • SMF-QtS SMF-Qt

        @JoeCFD

        No the Simulator and Tablet are15 the A06 is 14 and the HTC 12.

        JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote last edited by JoeCFD
        #4

        @SMF-Qt Maybe you can try to downgrade jdk and sdk versions for Android 14 and 12. Be aware that there is compatibility issue among these packages. You can go through my posts to find that out.

        1 Reply Last reply
        0
        • SMF-QtS Offline
          SMF-QtS Offline
          SMF-Qt
          wrote last edited by
          #5

          Thank you for your comment. During my journey to set up an android build enviromment I tried various combinations of build tool versions the set I am currently using produces working apk files for my selected set of deployment targets.

          JoeCFDJ 1 Reply Last reply
          0
          • SMF-QtS SMF-Qt

            Thank you for your comment. During my journey to set up an android build enviromment I tried various combinations of build tool versions the set I am currently using produces working apk files for my selected set of deployment targets.

            JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote last edited by
            #6

            @SMF-Qt I used Qt5 + old versions of sdk and jdk and did not have your issue on Tablet and Phone with Android 12/13/14.

            SMF-QtS 1 Reply Last reply
            0
            • JoeCFDJ JoeCFD

              @SMF-Qt I used Qt5 + old versions of sdk and jdk and did not have your issue on Tablet and Phone with Android 12/13/14.

              SMF-QtS Offline
              SMF-QtS Offline
              SMF-Qt
              wrote last edited by
              #7

              @JoeCFD

              Thanks for the insight but my path is qt6 and that is my focus.

              1 Reply Last reply
              0
              • SMF-QtS Offline
                SMF-QtS Offline
                SMF-Qt
                wrote last edited by SMF-Qt
                #8

                I am currently trying to find a c++ programmatic method for locking my application into landscape mode.
                I have seen on the web various methods (including copying and hacking build xml files) to acheive this but so far nothing constructive that support my Qt6 setup.
                I have found "setRequestedOrientation" references in various java files under the sdk and I know there was a Qt5 method for accessing it but nothing currently in Qt6.

                Any suggestions welcome.

                ekkescornerE 1 Reply Last reply
                0
                • SMF-QtS SMF-Qt

                  I am currently trying to find a c++ programmatic method for locking my application into landscape mode.
                  I have seen on the web various methods (including copying and hacking build xml files) to acheive this but so far nothing constructive that support my Qt6 setup.
                  I have found "setRequestedOrientation" references in various java files under the sdk and I know there was a Qt5 method for accessing it but nothing currently in Qt6.

                  Any suggestions welcome.

                  ekkescornerE Offline
                  ekkescornerE Offline
                  ekkescorner
                  Qt Champions 2016
                  wrote last edited by
                  #9

                  @SMF-Qt said in Qt 6.9.1 Android screen scale factor issues.:

                  I am currently trying to find a c++ programmatic method for locking my application into landscape mode.

                  you can try

                  bool ApplicationUI::setScreenOrientationLandscape()
                  {
                      QJniObject activity = QNativeInterface::QAndroidApplication::context();
                  
                      if(activity.isValid())
                      {
                          activity.callMethod<void>("setRequestedOrientation", "(I)V", 0);
                          return true;
                      }
                  
                      return false;
                  }
                  

                  ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                  5.15 --> 6.9 https://t1p.de/ekkeChecklist
                  QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                  SMF-QtS 1 Reply Last reply
                  3
                  • ekkescornerE ekkescorner

                    @SMF-Qt said in Qt 6.9.1 Android screen scale factor issues.:

                    I am currently trying to find a c++ programmatic method for locking my application into landscape mode.

                    you can try

                    bool ApplicationUI::setScreenOrientationLandscape()
                    {
                        QJniObject activity = QNativeInterface::QAndroidApplication::context();
                    
                        if(activity.isValid())
                        {
                            activity.callMethod<void>("setRequestedOrientation", "(I)V", 0);
                            return true;
                        }
                    
                        return false;
                    }
                    
                    SMF-QtS Offline
                    SMF-QtS Offline
                    SMF-Qt
                    wrote last edited by
                    #10

                    @ekkescorner

                    Thank you that worked.

                    ekkescornerE 1 Reply Last reply
                    0
                    • SMF-QtS SMF-Qt

                      @ekkescorner

                      Thank you that worked.

                      ekkescornerE Offline
                      ekkescornerE Offline
                      ekkescorner
                      Qt Champions 2016
                      wrote last edited by
                      #11

                      @SMF-Qt cool :)

                      ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                      5.15 --> 6.9 https://t1p.de/ekkeChecklist
                      QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                      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