Unsolved create tablet application and avoid rotation using qtwidget
-
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? -
@SherifOmran Probably using the native APIs of the underlying OS (iOS/Android what ever).
-
Hi
Did you try the manifest file?
https://stackoverflow.com/questions/20774498/qml-screen-orientation-lock
should also work with widgets. -
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
-
@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.
-
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 ? -
@SherifOmran Like explained here?
https://doc.qt.io/qt-5/ios-platform-notes.html