How to set orientation to Portrait for Android and iOS?
-
@NTMS
If you mean permanently from startup on, this is not a matter of Qt, but of the App definition. E.g. in Android you would specify the orientation in theAndroidManifest.xml
To change the orientation dynamically you need to make some JNI calls (see this).I don't know about iOS, but i guess the procedure is similar.
-
@raven-worx yes I need permanently from startup on. Both android and ios. How do I do that? Where do I get the information for ios. Thanks
-
@NTMS apple has a very good documentation
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW10<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array> -
@raven-worx and @ekkescorner
I thank you both. It is working now.
I created an "Other files" and I place android and ios folder in as shown below. I use AndroidManifest for android and Project-Infofor ios.