Nominate our 2022 Qt Champions!

IOS change screen orientation on button press

  • Greetings.
    I have been trying to figure out how to change the device orientation on IOS with a button press. The application has a video player, and when the user presses the full screen button, it should (force) change to landscape.

    Sadly I wasn't really successful in finding a working example.
    If I'm not wrong it should be set with UIINterfaceOrientationMask for IOS8 and above, however I'm not sure how to accomplish this.

    I'm trying to do this with objective-c and Qt 5.7.1.
    I would really appreciate if someone has advice or an example on how to accomplish this.

    Found the solution

Log in to reply