Qt 6.9.1 Android screen scale factor issues.
-
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.
-
@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.
-
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.
-
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.
@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-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; }
Thank you that worked.
-
Thank you that worked.
@SMF-Qt cool :)